PDA

View Full Version : margin error


richcodesign
07-30-2009, 12:33 PM
How can i have a gap appear between my container div and the menu bar div if i can not put in a margin-left value? (menu bar div sits inside the container)

This is the error that comes up.

"When a margin is applied to a floated box on the same side as the direction of the float, the margin is doubled. This bug only affects the first float in a row of one or more floats."

Affects: Internet Explorer 6.0
Likelihood: Very Likely

DWcourse
07-30-2009, 02:24 PM
can you use padding in the container div?

Or a border (same color as the container background on the menu?

Or absolutely position the menu relative to the container?

richcodesign
07-30-2009, 02:47 PM
I can not use padding as i have an image in the background of that div.

Ill try the border idea and see how that works. - but i do have a gradient effect in the background!!!

The absolutely positioned did not make any difference.

Any other ideas???

DWcourse
07-30-2009, 02:51 PM
I can not use padding as i have an image in the background of that div.

Padding shouldn't affect the positioning of a background image.

The absolutely positioned did not make any difference.

Did you apply position: relative to the container first?

Any other ideas???

Sorry, fresh out.

d a v e
07-30-2009, 02:55 PM
url may help suggest other ideas

richcodesign
07-30-2009, 04:31 PM
Heres the link - just loaded.
Setting a thick border wont work either - it just covers up the background image.

See link below.
so what im after is a gap to appear between my container div and the menu bar div, but i cant use margin left.

http://www.oakislandharbor.com/

Please keep in mind i set this up this morning so its no way near perfect yet! but if anyone wants to leave some constructive criticism, be my guest

DWcourse
07-30-2009, 06:45 PM
Not sure why you are using you are using your menu image as a background. If it was placed as an image within the sidebar div, you could use a margin around the image to accomplish what your want.

coloeagle
07-31-2009, 02:54 AM
I was able to add a left margin to the sidebar1 div.
If you are trying to add margin-left after the margin-top setting you need to be sure to add the semi-colon at the end of the 10px setting.
Should be margin-top:10px;

richcodesign
07-31-2009, 08:31 AM
I was able to add a left margin to the sidebar1 div.
If you are trying to add margin-left after the margin-top setting you need to be sure to add the semi-colon at the end of the 10px setting.
Should be margin-top:10px;

if i set a left margin im getting this error

"When a margin is applied to a floated box on the same side as the direction of the float, the margin is doubled. This bug only affects the first float in a row of one or more floats."

Affects: Internet Explorer 6.0
Likelihood: Very Likely

But i solved this by not putting it as a bg image and just inserting it - i added padding to the left.

domedia
07-31-2009, 04:00 PM
display: inline will fix the double margin bug in IE6