"A.Translator" <ad******************@yaBISHhoo.com> wrote:
HTML: http://www.spartanicus.utvinternet.ie/test/biblio3.htm
CSS: http://www.spartanicus.utvinternet.i.../HenkStyl3.htm
Your help does a lot to make me loose my fear for a table-less layout!
I will have a good look at what you have done, and may well take the
plunge.
Some explanation may help as there are a few hacks in there that may
make it less than obvious as to the why:
The page is wrapped in a <div class="content"></div> because IE does not
support setting the 736px width of the page directly on the body element
(which works fine in most other UAs).
IE5.5 does not support centering the content div in a spec compliant way
(by setting the left and right margin to auto), a hack that exploits a
bug in IE5.5 to get the content div to center was added by setting the
body to "text-align:center", IE5.5 then (erroneously) centers the
content div. Spec compliant browsers and IE6 ignore this, they use the
"margin:auto" rule applied to the content div itself.
A further hack is then needed as setting "text-align:center" on the body
element is inherited by descendant elements, so "text-align:left" was
added to the content div itself to prevent that from happening.
The menu was marked up using an unordered list, this is considered the
appropriate markup for what is essentially "a list of links".
Since the menu needs to be displayed horizontally those <li> elements
have been set to "display:inline", text links like the ones you use are
by default inline, this is not wanted in this case because inline
elements cannot be assigned a width. Unfortunately due to a missing
feature in CSS2.0 there is no "inline-block" element available. We can't
use block because that would result in the buttons being displayed
vertically. Enter another hack: setting the nav links to "float:left",
floats are block level elements, hence they can be assigned a width, but
since all menu links are floated left, they are displayed horizontally.
Due to the fact that this is a hack, a drawback now pops up: the <ul>
(block level) element's height collapses to 0 since floated elements are
not "part of the flow" (CSS speak, sorry). This has a negative effect on
being able to specify a top and bottom margin on the menu <ul>, to
counter that effect the <ul> has been assigned a height of 1.3em, this
is roughly equal to the button text height and since it's specified as
em it will expand with the text if the menu text is zoomed.
--
Spartanicus