Welcome to WebmasterWorld Guest from 54.166.122.69

Forum Moderators: not2easy

Body margins

table color/body width and N4.7 headache

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

10+ Year Member



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!

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

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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!
4:42 pm on Jan 4, 2003 (gmt 0)

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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

Nick

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

10+ Year Member



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;
}

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

10+ Year Member



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?

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

WebmasterWorld Senior Member nick_w is a WebmasterWorld Top Contributor of All Time 10+ Year Member



[w3.org...]

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

Nick

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

10+ Year Member



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?
6:05 pm on Jan 4, 2003 (gmt 0)

10+ Year Member



<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

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

10+ Year Member



thanks brian, I've got some copy in the td tag, but it still
won't run off the right side?
2:03 am on Jan 5, 2003 (gmt 0)

WebmasterWorld Senior Member tedster is a WebmasterWorld Top Contributor of All Time 10+ Year Member



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]

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

10+ Year Member



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

Featured Threads

Hot Threads This Week

Hot Threads This Month