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

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderators: not2easy

CSS Forum

    
Body margins
table color/body width and N4.7 headache
jfcates




msg:1209211
 4:32 pm on Jan 4, 2003 (gmt 0)

Is there some way to make N4.7 have a color run across
top of page 100%? This works in IE:

body { margin:0; padding:0; height:100%; width:100% }

then within the body is a two row table:

<table width="100%" height="10%" border="0" cellpadding="0" cellspacing="0" bgcolor="#FF0000" summary="">
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</table>

suggestions greatly appreciated!

 

tedster




msg:1209212
 4:37 pm on Jan 4, 2003 (gmt 0)

It depends on the entire layout, but when you can do it the surest way is a tiled background-image for <body>. No funky space to deal with!

Nick_W




msg:1209213
 4:42 pm on Jan 4, 2003 (gmt 0)

Good call tedster, I'd just given up trying to get a border to work on it ;)

Nick

marek




msg:1209214
 4:52 pm on Jan 4, 2003 (gmt 0)

jfcates, NN4 adds declared values to its default margins. To eliminate body margin at all, you have to define:

body {
margin: -10px 0 0 -10px;
}

for NN4 only and for other browsers:

body {
margin: 0;
}

jfcates




msg:1209215
 5:46 pm on Jan 4, 2003 (gmt 0)

Well, I tried this:
body { margin: -10px 0 0 -10px; }

and this:
html {
margin: 0;
padding: 0;
border: none;
}
neither one does the trick.

how do i do a tiled background-image for <body>;
more precisely, what's the code?

Nick_W




msg:1209216
 5:50 pm on Jan 4, 2003 (gmt 0)

[w3.org...]

Nice to have you onboard jfcates, check your sticky mail ;)

Nick

jfcates




msg:1209217
 5:54 pm on Jan 4, 2003 (gmt 0)

Hmmm... I'm half way there.
I type something in one of the table cells (same font
color as bgcolor table color), and now the color on the top shows up in N4,
but still won't run off the right edge?

Reflect




msg:1209218
 6:05 pm on Jan 4, 2003 (gmt 0)

<table width="100%" height="10%" border="0" cellpadding="0" cellspacing="0"
bgcolor="#FF0000" summary="">
<tr>
<td></td>
</tr>
<tr>
<td></td>
</tr>
</table>

With the above code the table cell will not show. For NN 4.X to show this cell you need something in the <td></td>. Just place a clear GIF image and the table cell should show up.

Brian

jfcates




msg:1209219
 6:15 pm on Jan 4, 2003 (gmt 0)

thanks brian, I've got some copy in the td tag, but it still
won't run off the right side?

tedster




msg:1209220
 2:03 am on Jan 5, 2003 (gmt 0)

how do i do a tiled background-image for <body>; more precisely, what's the code?

body {
background-image:url(background.gif);
}

Note - no quotes around the path for the image. If you want to tile in just one direction, you also use

background-repeat:repeat-x; [or repeat-y or no-repeat]

jfcates




msg:1209221
 2:07 pm on Jan 5, 2003 (gmt 0)

thanks tedster! :) that was a fix, and one i won't forget.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
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