homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Visit PubCon.com
Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

tiling background img in a 1px height table without any text for NS

 4:04 pm on Oct 17, 2001 (gmt 0)

in IE, it is pretty easy to get it.

in NS4, how can i have a tiling background img in a 1px height table without any text? that drives me crazy! the img is a 10px long and 1px high.

if i put   in TD, the img will be too high. height attribute seems not work. need a compatible way for both IE and NS.

<TD COLSPAN=4 width=100% height=1px bgcolor="#ffcc00" background="images/styles/yellow_line.gif">



 4:12 pm on Oct 17, 2001 (gmt 0)

i tried to put a 1px img in TD. but it still doesn't have the right 1px height in NS.

even just bgcolor is acceptable.


 5:34 pm on Oct 17, 2001 (gmt 0)

it is solved by finding out the previous posts.

thanks. it is such a good forum.


 8:31 pm on Oct 17, 2001 (gmt 0)

Hello Sophie - welcome to Webmaster World - yep its a great forum.

Glad to hear you solved the buglet. I was just about to try a few things out ;)

Was the answer simple?

My guess was height='1' and a 1x1 tansparent gif in the cell, and bgcolor with no background gif.


 3:36 pm on Oct 18, 2001 (gmt 0)

hi, gethan,

it is pretty simple. made a 1x1px img and insert <img src="" height=1 width=700> into the td tag. td just keeps the same bgcolor.

i am hoping to find a better one where 100% relative width can be used. it doesn't apply to the above situation.


 5:49 pm on Oct 18, 2001 (gmt 0)

If you use a 1x1 transparent gif, set the bgcolor for the table cell, and set the table/cell width to 100%, the 1x1 gif should "hold" the cell height at 1px, and the bg color would (of course) expand with the table width.


 6:37 pm on Oct 22, 2001 (gmt 0)

i tried it before, but NS4.08 always give me a much wider bar. are you sure it applys to NS4? if so , i will try again.


 6:52 pm on Oct 22, 2001 (gmt 0)

As I recall, it always worked for me...

I never used the 1x1 gif as a "background" image for the <td> tag though... I always set it up as:

<TD height="1" bgcolor="#000000"><img src="http//url.to/clear-pixel.gif" width="1" height="1"></td>

Maybe that's the catch for NN 4?


 7:15 pm on Oct 22, 2001 (gmt 0)

thank you mivox! it works!

the format i used to have was:


after i copy and paste your code in one line, it works! never noticed that the format of code have impact on layout.


 7:24 pm on Oct 22, 2001 (gmt 0)

With Netscape, I've noticed that line breaks in the code can have some very strange effects on spacing... usually extra vertical space ends up in places you don't want it.

Glad it worked! I haven't used a 1px gif in a while, so I wasn't sure if I remembered correctly... :)

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved