Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Padding in firefox

 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
when I set my style attribute in-line like so:



in i.e the padding looks fine, but in firefox it pads from the left
but the right end of the object grows too .

what am I doing wrong?

is that padding format only valid in i.e is there a better way to do it?

Thanks,

Justin

p.s

the object is a div.
[ June 09, 2008: Message edited by: Bear Bibeault ]
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you setting a doc type on your page?

Eric
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ye...

what it is is I have a table that I'm making 'dynamically' and in each cell there is a div that is getting certain style attributes set inline.

could the fact that it is inside a cell have a problem in ff and not ie?

Justin
 
Katrina Owen
Sheriff
Posts: 1367
18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tables can be a real pain!

First of all, they have a bunch of properties that apply to some elements but not others, and some properties that are specific to tables, and tables apply the box model differently than all other elements (as far as I've been able to determine, anyway).

So in summary: yes, it could very well be due to the table.

Could you show a section of code along with the CSS you've defined?
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yep, I'll find it comment it really well, and post it later today : ).

Thanks for wanting to help,

Justin
 
Justin Fox
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
basically it is something like this...



#CSS Class


And basically, in firefox when I pad that 5px from the left of the div the
div actually expands 5px to the right also (what I don't want).

But in IE the padding does just fine, and the div doesn't grow (like I like it ).

Thanks again,

Justin Fox
[ June 10, 2008: Message edited by: Justin Fox ]
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic