Forum Moderators: open

Message Too Old, No Replies

viewing 1px border on page load

         

kvanbeurden

12:31 pm on May 23, 2002 (gmt 0)



i have a 1px border in a resizable table as follows:

...
<tr>
<td valign="top" height="1"><img src="images/global/spacer.gif" width="100%" height="1" alt="spacer"></td>
</tr>
...

the issue is that when i load the page into my browser, the border in the resizing table does not initially load. if i do a refresh then it appears.

i assume this has something to do with the browser not knowing the size of the autostretching table at load time. is there a work around?

thanks.

Nick_W

12:57 pm on May 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Probably.

Here's a better way:

<tr>
<td valign="top" class="border"></td>
</tr>

.border {
border: 1px solid #000000;
}

If you need it you could stick a 1x1px transparent image in there but don't give it an alt="spacer" it's worse than useless. Use alt="" which is much more useful adn saves a few bytes ;)

Nick

kvanbeurden

1:59 pm on May 23, 2002 (gmt 0)



what is the browser compatibility for this CSS solution?

Nick_W

2:14 pm on May 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



all but nn4 will handle that ok I beleive.

Nick

kvanbeurden

2:18 pm on May 23, 2002 (gmt 0)



thanks. i am giving up on nn4 anyway. it is time to move on.

though there is that nagging 22% or so...

Nick_W

2:24 pm on May 23, 2002 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Then don't give up entirely! Settle for 'useable' rather than pretty. That's what I do ;)

Nick

kvanbeurden

2:34 pm on May 23, 2002 (gmt 0)



i will fight for both!

thanks, nick.