ALA's Holy Grail is bad?

D

dave

That's easily fixed by giving the main div an appropriate negative top
margin.

Well since the body has a font size of 1.3em I chose -1.3 em for the
margin on the body and this seems to be about right. Playing with it a
little more and I chose 1.33 which seems perfect for FF and Opera. On
IE this causes the main to overlay the header. Am I not getting
something or is this a bug with the browsers? I'm thinking at this
point it's a bug with the browsers and I shouldn't mess with a
hardcoded negative margin that will be changing from year to year as
the browsers evolve...

Am I totally missing something?
 
T

Toby A Inkster

dave said:
Well since the body has a font size of 1.3em I chose -1.3 em for the
margin on the body and this seems to be about right. Playing with it a
little more and I chose 1.33 which seems perfect for FF and Opera. On
IE this causes the main to overlay the header. Am I not getting
something or is this a bug with the browsers?

It may be that the weird margin isn't font-size-dependent, so setting it
in ems causes inconsistent results. Try using px or mm to set this negative
margin and see what happens.

--
Toby A Inkster BSc (Hons) ARCS
http://tobyinkster.co.uk/
Geek of ~ HTML/SQL/Perl/PHP/Python*/Apache/Linux

* = I'm getting there!
 
B

Bergamot

Greg said:
That's easily fixed by giving the main div an appropriate negative top
margin.

That's the wrong "fix" for this particular issue. The space above the
center column is caused by something called "collapsing margins", the
default top margin on the h2 element in this case.

Get rid of it by giving the center column a top padding of 1px. The
space above the footer is due to the same thing, except it's the default
bottom margin of the last paragraph.
 
D

dave

That's the wrong "fix" for this particular issue. The space above the
center column is caused by something called "collapsing margins", the
default top margin on the h2 element in this case.

Get rid of it by giving the center column a top padding of 1px. The
space above the footer is due to the same thing, except it's the default
bottom margin of the last paragraph.

Thanks, that did indeed take care of the problem. I tested it with
Opera, IE, and FF on Linux and XP. All platforms and browsers work!

Thanks Berg and Gregor.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,743
Messages
2,569,478
Members
44,898
Latest member
BlairH7607

Latest Threads

Top