*
The moose likes HTML, CSS and JavaScript and the fly likes Padding in firefox Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Padding in firefox" Watch "Padding in firefox" New topic
Author

Padding in firefox

Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
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 ]

You down with OOP? Yeah you know me!
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
Are you setting a doc type on your page?

Eric
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
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

Joined: Nov 03, 2006
Posts: 1357
    
  17
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

Joined: Jan 24, 2006
Posts: 802
Yep, I'll find it comment it really well, and post it later today : ).

Thanks for wanting to help,

Justin
Justin Fox
Ranch Hand

Joined: Jan 24, 2006
Posts: 802
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 ]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Padding in firefox
 
Similar Threads
How to fill an HTML table using javascript
no scroll bar in IE,but Scroll bar in MF
Overlapping columns in Firefox
bullets don`t get printed out
div tag