|
|
||||||
|
||||||
| Index Link To US Private Messages Archive FAQ RSS | ||||||
| Web Programming Discussion Forum Working with an API? Developing a plugin? Writing a Mod or script for your favorite blog, Web 2.0 site or Forum? Welcome. |
Share Thread: & Tags
|
||||
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
Not sure what you mean by 'inline', but wouldn't CSS solve your problem?
__________________
Pete Clark Got any spare time? Anything you need? Barter in Spain at http://BarterWithBart.com |
|
|||
|
This some CSS that I use for a horizontal menu.
Maybe it will help - #navigation{ background:url(images/nav.jpg) no-repeat bottom center; height:44px; line-height:44px; } #navigation ul { margin: 0; padding: 0; list-style-type: none; text-align: center; } #navigation ul li { display: inline; } #navigation ul li a { text-decoration: none; padding: 15px 1em; color: #fff; text-transform:uppercase; font-size:12px; letter-spacing:1px; } #navigation ul li a:hover { color: #FFFF00; background:url(images/nav_hover.jpg) bottom center; } The thing that makes it center is the ul set to center. I think that if you removed the height and line height references from "navigation" that it should wrap and horizontal center. You can see it in action here - http://dan.idano.net Dan |
|
||||
|
Thanks for the replies -- the issue is when the menu wraps onto a second line. The second (and subsequent) lines always seem to align to the left of their container, even if that container is centered.
Here's the page I'm having the issue with: http://www.control-access8.com/~soulconnection/ If you scroll down to the bottom, you'll see that the links in the footer are centered as a whole, but the individual lines aren't centered relative to each other, and I can't get them to, no matter how many elements I make text-align:center. |
|
|||
|
Actually I could not let it go. This works and you can see a sample of it here -
http://temp.idano.net/ Here is the modified CSS - #navigation{ background:url(images/nav.jpg); } #navigation ul { margin: 0; padding: 0; list-style-type: none; text-align: center; } #navigation ul li { display: inline; line-height:44px; } #navigation ul li a { text-decoration: none; padding: 15px 1em; color: #fff; /*text-transform:uppercase;*/ font-size:12px; letter-spacing:1px; font-weight:bold; } #navigation ul li a:hover { color: #fee202; background:url(images/nav_hover.jpg) bottom center; } It wraps to the second line and is centered. Dan |
|
||||
|
Add this to the bottom of your stylesheet:
#footer ul.menu { text-align: center; } tested in firefox and found to work. It's possible you might have to get even more specific in IE. |
|
||||
|
You're very welcome.
I've had quite a bit of practice . . . which means I have a permanent callus (sp?) on my forehead from banging my head against the desk. |
|
||||
|
fyi... your font in IE is almost illegible as it's soooo tiny.. in firefox it's nice and large (almost too large lol)..
not sure if that intended however if not it might be something you'll want to look at. Nice design!
__________________
Ron Boyd website consulting (design, optimization, marketing) :: Follow Me: @orionsweb |
|
||||
|
CSS or Tables
(Your Page look quite as it is good now :) Well here's basic tables:- Idea is to place code in a middle cell of three. Youc can then do an align="left" that cell. Code:
<table border="1" width="100%">
<tr>
<td width="33%"></td>
<td width="33%">
<ul>[*]1[*]2[*]3[*]4[/list] </td>
<td width="34%"></td>
</tr>
</table>
|
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
|
WebProWorld |
Advertise |
Contact Us |
About |
Forum Rules |
MVP's |
Archive |
Newsletter Archive |
Top |
WebProNews
WebProWorld is an iEntry, Inc. ® site - © 2009 All Rights Reserved Privacy Policy and Legal iEntry, Inc. 2549 Richmond Rd. Lexington KY, 40509 |