This is a discussion on "Firefox ignoring padding-left" within the Web Page Design section. This forum, and the thread "Firefox ignoring padding-left are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Firefox ignoring padding-left
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
#1
|
|||
|
|||
|
Firefox ignoring padding-left
OK, this is really annoying me.
I've been duplicating a tables-layout using CSS, working in IE, and have just started viewing it in FF (probably the wrong way 'round, but anyway). Many of the pages have an image or two in a column down the left side of the page, always the same width, and then the text on the rest of the page - so there is always a gap between the text and the left hand side of the page, width enough to accomodate the images, whether or not there are any there. I implemented this by having the images floated to the left at the appropriate point, and text in a div with padding-left: 160px. In IE this works fine. Firefox ignores the padding completely. Quirks or Standards mode. No margin set, no width set, on the padded div. It has padding, and it ignores it. Just wraps around the floated images as if no padding was set. Am I missing something about the box model here? I really can't see what's going wrong.
|
|
|
|
#2
|
|||
|
|||
|
Re: Firefox ignoring padding-left
You've got an extra }
See below in red.
|
|
#3
|
|||
|
|||
|
Re: Firefox ignoring padding-left
Wow, sharp eyes. And that made all the difference? I would've expected that to be handled a little more gracefully...
|
|
#4
|
|||
|
|||
|
Re: Firefox ignoring padding-left
GREAT!!
And as you have figured out, designing for FF first is easier .. then fix things for IE. I also think it might be better instead of using padding-left to use margin-left. But maybe that doesn't matter??? |
|
#5
|
|||
|
|||
|
Re: Firefox ignoring padding-left
I'm thinking my whole overhaul needs an overhaul
But if that div had a border... I guess I'd want the image on the inside. Or would I? |
|
#6
|
|||
|
|||
|
Re: Firefox ignoring padding-left
Yes in that case you'd do this:
HTML
|
|
#7
|
|||
|
|||
|
Re: Firefox ignoring padding-left
Leaving an unclosed { } in your CSS can have a huge effect on your website! I did it once and my whole site disappeared!
|
|
#8
|
|||
|
|||
|
Re: Firefox ignoring padding-left
Its so stupid. I remember one time when I forgot to close a html tag and nothing would show up. It was very strange. That said I could have made other mistakes too (make that 'probably' rather than 'could have').
Glad you got it sorted now . Pete. |
|
#9
|
|||
|
|||
|
Re: Firefox ignoring padding-left
I recommend validating your CSS/HTML as the first step in debugging code. Even small code mistakes often cause unpredictable errors.
This applies even when you think your code is valid. I've often failed to notice that changes made my (formerly valid) code invalid. Last edited by MikeHopley; Jul 11th, 2007 at 21:46. |
|
#10
|
|||
|
|||
|
Re: Firefox ignoring padding-left
Two lessons here:
always design in standards-compliant browsers, THEN afterwards for the likes of IE; validate your code. The error may be staring you in the face. |
![]() |
| Tags |
| ff ie padding |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Problem setting the left/right/top/bottom padding of a table to different values | tonyb | Web Page Design | 2 | May 2nd, 2008 20:30 |
| Have Microsoft left it too late? IE7 is out and firefox still gaining big ground | Rob | Webforumz Cafe | 25 | Oct 28th, 2007 14:29 |
| CSS padding Firefox vs IE | WL1207 | Web Page Design | 5 | Oct 18th, 2007 13:56 |
| Float: Left with firefox | magnetica | Web Page Design | 2 | Aug 24th, 2007 16:55 |
| Padding on #header background image.. IE6/Firefox. | rooraaahcrumbs | Web Page Design | 1 | Apr 26th, 2006 20:49 |