Conflict between float, margin and width... how do you resolve this?
Posted: Sat Jul 26, 2008 12:22 am
Hi Guys,
Basically what I'm trying to do is a kind of a 2 column design.
I have a menu floated to the left (clearing the header) with margins all around.
and I have the main content block.
I'd like the content block to have a margin from the header, menu and the right side.
I tried:
without setting width, but that just results in the content clock clearing the menu (for some unknown [to me] reason).
tried:
but no dice there either.
I can set the width to something... say:
and then the page displays but it disregards the margins on one side (depending on the float direction).
is there anyway to tell the content-div to change the width so it is always 5px away from the menu, the header and the right edge?
Argh! headache!
Thanks alot!
-Leav
Basically what I'm trying to do is a kind of a 2 column design.
I have a menu floated to the left (clearing the header) with margins all around.
and I have the main content block.
I'd like the content block to have a margin from the header, menu and the right side.
I tried:
Code: Select all
margin: 5px;
tried:
Code: Select all
width: auto;
I can set the width to something... say:
Code: Select all
width: 80%;
is there anyway to tell the content-div to change the width so it is always 5px away from the menu, the header and the right edge?
Argh! headache!
Thanks alot!
-Leav