• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Padding in firefox

 
Ranch Hand
Posts: 802
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Sheriff
Posts: 1367
18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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 ]
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic