In article
<
MPG.297970786...@news.eternal-september.org>,
...
> >
> > It even works in IE8.
> >
> > But you cannot count on IE6 or 7 or 8 or maybe even 9 in
> > "compatibility" mode. But then, you have to be pretty careful
> > with all sorts of things with earlier IE, even inline-box if you
> > use it.
>
> Well, using the link works nicely (in SeaMonkey, my default browser -
> I use others during development after rendering in SeaMonkey). However,
> the buttons line up across the top, and I'd really like to have them
> line up vertically on the left (as
www.Raceplaceevents.com does), along
> with equal fixed widths. Is there a way to do that?
...
Yes, certainly. One quick way is to adapt the CSS in my URL
above. Let's see...
First, obviously, we have to remove the float on li so the list
items stop floating and revert to their natural behaviour of one
under the other. While we are at it, let's remove all the CSS for
the UL element. And lessen the gap between the list items. And
now no need for a right margin.
So far then, we start the new with
<style type="text/css">
li {
margin-right:
margin-bottom: .3em;
/* float: left; remove this line*/
text-align: center;
list-style-type: none;
}
...
Now note that the 'buttons' are only as wide as they need to be
because table cells, like a few other display modes cause
shrink-to-fit. We need to be rid of this as you want all your
buttons to be neatly same width. One simple solution is to add a
set width to the style of the anchor element. So:
a {
display: table-cell;
vertical-align: middle;
color: #fff;
background: #1c508c;
text-decoration: none;
width: 10em; /* add this */
height: 5em;
border: 3px outset #1c508c;
padding: .2em;
}
And Bob is sort of your uncle.
Mind you, if I was your uncle, I would tell you to remove the
height too now and allow the buttons to be as high as they need
to be and no more.
In fact, if I was *really* your uncle, I would suggest even
simpler and not have the table-cell display. Just:
li
{
margin-right: .2em;
margin-bottom: .3em;
text-align: center;
list-style-type: none;
}
a
{
display: block;
color: #fff;
background: #1c508c;
text-decoration: none;
width: 10em;
border: 3px outset #1c508c;
padding: .2em;
}
a:hover {color: #c00; background: #ccc;}
and a bit more to cover the states of the anchor...
--
dorayme