| | #1 |
| Active Warrior War Room Member Join Date: 2008
Posts: 37
Thanks: 39
Thanked 0 Times in 0 Posts
|
Hi guys and gals, I have looked every where to find a solution for this to no avail so I thought I'd try the dependable old warrior forum. Hopefully some CSS expert can help me out here PROBLEM: I am targeting a niche which is a Long keyword I want to be able to have my links on the NAV bar in two lines... Example: I need my nav-bar to go From This Home |Long keyword 1| Long keyword 2| Long keyword 3| long keyword 4 To Each Link Looking Like This Long Keyword 1 I don't want to create any drop down menus or anything I'm just short of a little space to get all the page links I want on the nav bar. Is their a snippet of CSS code I can use to do this? This is the Nav-bar code /* Nav Bar -------------------------------------------------------------- */ #nav-bar { width: 653px; height: 33px; min-height: 33px; margin: 0px; padding: 0px; display: inline; overflow: hidden; float: left; } #nav-bar-content { margin-left: 15px; line-height: 33px; /* added this to fix vertical centering of text 17/11/09 */ } #nav-bar ul{ width: 653px; /* fix added v2.2 12/08/09 */ margin: 0; padding: 0; list-style:none; } #nav-bar ul li { float:left; } #nav-bar ul li a { margin-right: 20px; font-size: 0.75em; font-weight: bold; overflow:hidden; Thanks in advance for any help and advice Cheers Steve |
| |
| | #2 |
| antipot War Room Member Join Date: 2009
Posts: 270
Thanks: 65
Thanked 267 Times in 24 Posts
|
have you tried just using simple <br/> ? |
|
Be The Change You Want To See In The World
| |
| |
| | #3 |
| Active Warrior War Room Member Join Date: 2008
Posts: 37
Thanks: 39
Thanked 0 Times in 0 Posts
| |
| |
| | #4 |
| VIP Warrior Join Date: 2005 Location: Potemkin Village
Posts: 1,724
Thanks: 745
Thanked 742 Times in 498 Posts
|
Assuming that those spaces between the words in the menu item are just spaces (not nbsp , then you should be able to tweak the CSS to set a width for each menu item and the words will wrap to a new line.
|
|
:)
| |
| |
| | #5 | |
| Active Warrior War Room Member Join Date: 2008
Posts: 37
Thanks: 39
Thanked 0 Times in 0 Posts
|
Would you be able to show me what the code would be and where to put it? Thanks Steve | |
| |
| | #6 | |
| VIP Warrior Join Date: 2005 Location: Potemkin Village
Posts: 1,724
Thanks: 745
Thanked 742 Times in 498 Posts
|
Well, having never seen your site, I think a good place to start would be defining a width on the list items in your menu. Maybe change it from: #nav-bar ul li { float:left; } to #nav-bar ul li { float:left; width:120px; } See if that does something remotely close to what you want. If it does, tweak it some more. | |
|
:)
| ||
| |
| | #7 | |
| Active Warrior War Room Member Join Date: 2008
Posts: 37
Thanks: 39
Thanked 0 Times in 0 Posts
|
Thanks for your input Mojuju | |
| |
| | #8 |
| VIP Warrior Join Date: 2005 Location: Potemkin Village
Posts: 1,724
Thanks: 745
Thanked 742 Times in 498 Posts
|
Hang on. I didn't notice you had the height attribute set on "nav-bar". You need to delete or comment that out because when the text wraps, it's going to be taller than the 33px you have there. Since overflow is set to hidden, then only the first line of text is going to show. Comment out those things and it should look better.
|
|
:)
| |
| |
|
| Bookmarks |
| Tags |
| lines, links, navbar |
| |