Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Forcing Horizontal List width
Old 02-20-2007, 07:05 PM Forcing Horizontal List width (New Question about text-align)
johnncyber's Avatar
Extreme Talker

Posts: 216
Trades: 0
I am trying to create a horizontal text navigation at the bottom of a page. All of the links are in a list. (This can not be helped, it is a joomla based site. it is either they are in a list or in a table /chringes.)

I have managed to get the list to display horizontally, now the trick is how can I force it to break to a new line once it reaches its width?

This is the snippet of CSS:

Code:
ul#mainlevel-bottom
{
    width: 980px;
}

ul#mainlevel-bottom li
{
    display: inline;
    position: relative;
    background-image: none;
    padding-left: 4px;
    padding-right: 4px;
    margin: 0;
    white-space: pre;
    border-right: 1px solid #FFF;
}

ul#mainlevel-bottom li a
{
    text-decoration: none;
    font-size: .8em;
    color: #FFF;
}

ul#mainlevel-bottom li a:hover
{
    text-decoration: none;
    font-size: .8em;
    color: #ff0066;
}
Here is the live site: http://www.partyparadiserental.com
__________________
~Mark Romero
-Co Founder | Tech Guru,
Please login or register to view this content. Registration is FREE

-FireFox Advocate,
Please login or register to view this content. Registration is FREE

Last edited by johnncyber; 02-21-2007 at 03:59 PM..
johnncyber is offline
Reply With Quote
View Public Profile Visit johnncyber's homepage!
 
 
Register now for full access!
Old 02-21-2007, 12:53 AM Re: Forcing Horizontal List width
LadynRed's Avatar
Defies a Status

Posts: 10,016
Location: Tennessee
Trades: 0
Float the list and put it in a container with a defined width.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 02-21-2007, 03:10 AM Re: Forcing Horizontal List width
johnncyber's Avatar
Extreme Talker

Posts: 216
Trades: 0
Thanks, that did the trick. Now my next problem, I can't seem to get the text to center align. I tried to do text-aligns on everything from the ul element to the li, to the div. Any help would be appreciated.

I am off to find some aspirin.

EDIT: I was able to make the first row align to the center, but the second row doesn't align.
__________________
~Mark Romero
-Co Founder | Tech Guru,
Please login or register to view this content. Registration is FREE

-FireFox Advocate,
Please login or register to view this content. Registration is FREE

Last edited by johnncyber; 02-21-2007 at 05:18 PM..
johnncyber is offline
Reply With Quote
View Public Profile Visit johnncyber's homepage!
 
Reply     « Reply to Forcing Horizontal List width
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 5.15246 seconds with 12 queries