/    Sign up×
Community /Pin to ProfileBookmark

Can’t get a dotted line to work in both IE and Mozilla

I want a horizontal dotted line, but I can’t get it to work in both IE and Mozilla.

HTML:
<table width=”780″ border=”0″ cellpadding=”5″ cellspacing=”0″ >
<tr>
<td>
<table width=”100%” border=”0″ cellpadding=”0″ cellspacing=”0″ >
<tr class=”dot”><td colspan=”3″><div /></td></tr>

CSS:
.dot {
background-image: url(/myserver/images/dot.gif);
height: 1;
}

This will paint a beautiful dotted line in Mozilla! In IE, though, it doesn’t show a single dot…

Regards

to post a comment
HTML

3 Comments(s)

Copy linkTweet thisAlerts:
@CharlesMay 26.2003 — [font=georgia]And stop using tables for layout. Your problem is that Mozilla correctly will not recognize empty cells.[/font]
Copy linkTweet thisAlerts:
@m0llbuz_authorMay 27.2003 — I finally got it to work! Yep, I put the class in the table cell instead of the row. Then the height property started working. Then I added background-repeat and it worked.

I had the div tag in the cell because I thought I had to have something in there. Obviously I don't... I checked.

Okay, you say I shouldn't use tables for layout, but you don't offer any alternative methods?

Thanks guys!

HTML:

<table width="780" border="0" cellpadding="5" cellspacing="0" >

<tr>

<td>

<table width="100%" border="0" cellpadding="0" cellspacing="0" >

<tr><td colspan="3" class="dot"></td></tr>

CSS:

.dot { background-image: url(/myserver/images/dot.gif);

background-repeat: repeat-x;

background-position: center;

height: 1px;

}
Copy linkTweet thisAlerts:
@brendandonhueMay 27.2003 — Use whatever you want for layout, just not tables ?

Try a DIV.
×

Success!

Help @m0llbuz_ spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.22,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...