Hi,
I am trying to create a simple, single-column site with a fluid layout and margins around the outside of the page.
Using a DIV with 100% width plus margins, FF interprets the page as larger than the window and hence displays horizontal scroll bars.
Instead, I thought, why not try using 90% width and 5% margins on either side:-
div.fluid {
float: left;
border: 1px solid grey;
width: 90%;
margin-left: 5%;
margin-right: 5%;
margin-top: 10px;
}
I check FF - Hoorah! Success!
Next I check IE6.... Boo! There is a horizontal scrollbar, and for some reason the border isn't displayed.
I need to set the padding and margin of the body to 0, so I have to create this spacing using the DIV.
I have read through lots of websites regarding "fluid layouts" but none of them seem to incorporate margins around the outside of the page.
I hope this makes sense. Any help you can give me would be greatly appreciated.
Thanks,
Toby
I am trying to create a simple, single-column site with a fluid layout and margins around the outside of the page.
Using a DIV with 100% width plus margins, FF interprets the page as larger than the window and hence displays horizontal scroll bars.
Instead, I thought, why not try using 90% width and 5% margins on either side:-
div.fluid {
float: left;
border: 1px solid grey;
width: 90%;
margin-left: 5%;
margin-right: 5%;
margin-top: 10px;
}
I check FF - Hoorah! Success!
Next I check IE6.... Boo! There is a horizontal scrollbar, and for some reason the border isn't displayed.
I need to set the padding and margin of the body to 0, so I have to create this spacing using the DIV.
I have read through lots of websites regarding "fluid layouts" but none of them seem to incorporate margins around the outside of the page.
I hope this makes sense. Any help you can give me would be greatly appreciated.
Thanks,
Toby