HighDots Forums  

FF Padding Problem

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss FF Padding Problem in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Mike
 
Posts: n/a

Default FF Padding Problem - 03-22-2007 , 06:29 PM






I am having a problem with padding. I have three boxes and I want them
all to be the same width. In IE it looks like the outside of the DIV
stays put and the padding is placed on the inside, so the bottom box
lines up with the middle box - which is what I want. In FF it looks like
the padding is making the DIV grow to the size of the padding and the
boxes then don't line up. If I take the padding out, then the boxes are
the same width, but then the text is jammed against the edges.

The link is:

http://www.giftbasketsandtrinkets.com

I believe the problem is with the "content" id, but no amount of
tinkering has made it any better.

Any help will be greatly appreciated!

Reply With Quote
  #2  
Old   
Richard Formby
 
Posts: n/a

Default Re: FF Padding Problem - 03-22-2007 , 06:57 PM






Mike

You are running the browser (IE) in qurks mode, where it reproduces the
broken box model from prior versions. Google for "quirks mode".

--
Richard.




Reply With Quote
  #3  
Old   
John Hosking
 
Posts: n/a

Default Re: FF Padding Problem - 03-22-2007 , 07:07 PM



Mike wrote:
Quote:
I am having a problem with padding.
Cut down on the beer, then. Har!

Quote:
I have three boxes and I want them
all to be the same width. In IE it looks like the outside of the DIV
stays put and the padding is placed on the inside, so the bottom box
lines up with the middle box - which is what I want. In FF it looks like
the padding is making the DIV grow to the size of the padding and the
boxes then don't line up. If I take the padding out, then the boxes are
the same width, but then the text is jammed against the edges.

The link is:

http://www.giftbasketsandtrinkets.com

I believe the problem is with the "content" id, but no amount of
tinkering has made it any better.
Well, despite your subject line, it's not a FF padding problem.

First, if you're going to compare IE with FF, get yourself out of quirks
mode (q.G.) and into standards mode. Drop the transitional doctype and
go for 4.01 strict.

And since you're using HTML and not XHTML, clean out the /> endings in
your code.

And since you didn't notice the endings, you should probably learn
validate your code and CSS.

And now to the tiny little detail of your problem, which you have all
but solved yourself already:

Change the width you defined for #content to width:680px.

The "why" is the broken box model (q.G.) IE uses in quirks mode.

Remember, too, though, that specifying width for text elements in px
like this is not a great idea. First of all, users of IE (<7) won't be
able to read your text in all cases, because you have hard-coded a small
size. In real browsers, however, changing the font size will break your
design (your three boxes will still -- steadfastly -- remain the same
size, but your menu will overflow the space you've provided. Watch out!

HTH
--
John


Reply With Quote
  #4  
Old   
John Hosking
 
Posts: n/a

Default Re: FF Padding Problem - 03-22-2007 , 07:09 PM



Richard Formby wrote:
Quote:
You are running the browser (IE) in qurks mode, where it reproduces the
broken box model from prior versions. Google for "quirks mode".
Hmm, I'm either too slow or too verbose. :-)

--
John


Reply With Quote
  #5  
Old   
dorayme
 
Posts: n/a

Default Re: FF Padding Problem - 03-22-2007 , 07:32 PM



In article <RqDMh.15914$1a6.3353@trnddc08>,
Mike <mmlk (AT) earth (DOT) net> wrote:

Quote:
I am having a problem with padding. I have three boxes and I want them
all to be the same width. In IE it looks like the outside of the DIV
stays put and the padding is placed on the inside, so the bottom box
lines up with the middle box - which is what I want. In FF it looks like
the padding is making the DIV grow to the size of the padding and the
boxes then don't line up. If I take the padding out, then the boxes are
the same width, but then the text is jammed against the edges.

The link is:

http://www.giftbasketsandtrinkets.com

I believe the problem is with the "content" id, but no amount of
tinkering has made it any better.

Any help will be greatly appreciated!
I did notice that it looked odd that your top box was not the
same size as the others below and I was able to fix easily by
altering the width (in FF on a Mac). But I am reluctant to get
into this matter as cross browser, cross platform success with
your fixed width code is not what I would attempt.

It looked "reasonable for a short range of font-size clicks in FF
with:

#content {
....
margin: auto;
....
}

#page_heading {

width: 760px;
....
}

and

#globalnav {

width: 760px;
....
height: 2.5em;
....
margin: auto;
....
}

But really, this is just fiddling about and I have not looked
deep into the matter with your hacks and stuff.

It makes me almost cry that there are any reasons at all for you
not simply making the lot into a relatively simple table and
avoid all the anxieties of performance cross browser.

--
dorayme


Reply With Quote
  #6  
Old   
Mike
 
Posts: n/a

Default Re: FF Padding Problem - 03-22-2007 , 08:08 PM



John Hosking wrote:
Quote:
Mike wrote:
I am having a problem with padding.

Cut down on the beer, then. Har!

I have three boxes and I want them all to be the same width. In IE it
looks like the outside of the DIV stays put and the padding is placed
on the inside, so the bottom box lines up with the middle box - which
is what I want. In FF it looks like the padding is making the DIV grow
to the size of the padding and the boxes then don't line up. If I take
the padding out, then the boxes are the same width, but then the text
is jammed against the edges.

The link is:

http://www.giftbasketsandtrinkets.com

I believe the problem is with the "content" id, but no amount of
tinkering has made it any better.

Well, despite your subject line, it's not a FF padding problem.

First, if you're going to compare IE with FF, get yourself out of quirks
mode (q.G.) and into standards mode. Drop the transitional doctype and
go for 4.01 strict.

And since you're using HTML and not XHTML, clean out the /> endings in
your code.

And since you didn't notice the endings, you should probably learn
validate your code and CSS.

And now to the tiny little detail of your problem, which you have all
but solved yourself already:

Change the width you defined for #content to width:680px.

The "why" is the broken box model (q.G.) IE uses in quirks mode.

Remember, too, though, that specifying width for text elements in px
like this is not a great idea. First of all, users of IE (<7) won't be
able to read your text in all cases, because you have hard-coded a small
size. In real browsers, however, changing the font size will break your
design (your three boxes will still -- steadfastly -- remain the same
size, but your menu will overflow the space you've provided. Watch out!

HTH
That's got it fixed. I have some more reading and learning to do!

Thanks to all that helped!!


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.