I've actually isolated what my issue is with this. I've got the list
working fine in both FF and IE, but if I try to absolutely position the
entire list, the images are no longer centered in FF, but it still works
in IE.
Here's the CSS I'm using:
ul.menu
{
position: absolute;
left: 170px;
list-style: none;
top: 30px;
}
ul.menu li
{
float: left;
margin-right: 10px;
text-align: center;
}
ul.menu li img
{
display: block;
margin: 0 auto;
}
ul.menu li a
{
text-decoration: none;
color: #315195;
font-size: .65em;
}
If I remove the positioning from "ul.menu", everything works nicely, but
with it, FF doesn't center the images.
Does anyone know why that is? I've tried numerous things and haven't
been able to get it.
Ted Drake wrote:
I've had good luck with li img {vertical-align:middle}
This helps if you have an image that is roughly the same height as the text
in the list item. It's not as good if the text begins to wrap.
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]
On Behalf Of Thierry Koblentz
Sent: Thursday, June 01, 2006 9:45 AM
To: [email protected]
Subject: Re: [WSG] Horizontal List Issue
Jonathan Carter wrote:
That would be the my desired way of doing it, but like I said, the
list is generated dynamically, it's not static HTML. There could be
any number of list items that are displaying any image that is
uploaded by the user, so I wouldn't know what image to make as the
background for each item.
What about:
HTML:
<li><img src="image.gif" alt="Some Text" />This is more text</li>
CSS:
li {list-style-type:none;text-align:center;float:left;width:100px}
li img {display:block;margin:0 auto}
---
Regards,
Thierry | www.TJKDesign.com
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************
******************************************************
The discussion list for http://webstandardsgroup.org/
See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************