Log in

View Full Version : IE seems to be putting in extra paddiing



wkennyspain
12-09-2012, 03:25 PM
IE seems to be putting in extra padding in the menu on the left-hand side of this home page, causing the menu to overlap the middle content.

http://www.estateagentsespana.com/

It displays correctly in Firefox and Chrome.

I'd appreciate any help in getting to the bottom of this.

Beverleyh
12-09-2012, 04:25 PM
Yep, that'll be the lovely way that IE interprets the box model ;)
Reference: http://en.m.wikipedia.org/wiki/Internet_Explorer_box_model_bug and http://stackoverflow.com/questions/1210417/best-way-to-solve-the-padding-css-problem

The best way to tackle it is by using an IE specific style sheet: http://css-tricks.com/how-to-create-an-ie-only-stylesheet/

wkennyspain
12-10-2012, 12:52 PM
Thanks Beverly, but I had looked at possible box problems before posting. When I set padding and margin to 0, IE still indents the menu text. What I need to do is have the menu text appear immediately inside the vertical line and I just can't get this. After solving this problem. I can look at using IE specific styles.

Beverleyh
12-10-2012, 01:31 PM
I'm not seeing any menu indent, or any overlap into the main content. Checked in IE9 & IE8 against Chrome - they both look virtually the same.

Is it still happening at your side? Maybe you just need to refresh your cache?

Can you provide a screen capture of your problem if you still have it as I'm not entirely sure what the error is.

wkennyspain
12-10-2012, 02:53 PM
I've uploaded screen prints to here. Did these just now.

http://www.estateagentsespana.com/screenie.htm

I'm using IE7

Beverleyh
12-10-2012, 03:24 PM
Try this CSS on the menu ul;
#navigation ul { list-style-type:none; margin:0; padding:0; }

wkennyspain
12-10-2012, 03:52 PM
I've tried that, putting the line in after all othe #navigation but it makes no difference.

Beverleyh
12-10-2012, 04:30 PM
Then I'll refer you back to my first reply as you should probably try targetting IE7 (and under?) and put a negative left margin on the li's.

#navigation li { margin-left:-40px; }
Have a play with the ul or li placement in your IE7 specific stylesheet because IE7 is known for adding a 40px (ish) indent on list items.

wkennyspain
12-10-2012, 05:30 PM
I've tried that, putting the line in after all othe #navigation but it makes no difference.

wkennyspain
12-10-2012, 05:31 PM
Voila! That does the trick. Thanks for all your help, Beverley

Beverleyh
12-10-2012, 06:13 PM
No problem. Glad you got it fixed!

wkennyspain
12-10-2012, 06:38 PM
I've just realised my "I've tried that .." post went in twice. Just to clarify that using the minus value for the margin solves the problem.