Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations sizbut on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

wrapping long navigation bars

Status
Not open for further replies.

cajchris

Programmer
Oct 13, 2005
57
GB
hi,

I am wondering if any1 knows how to wrap the contents of a horizontal navigation bar if there are many links on it, so that it looks neater

regards
chris
 
Do you want to know how from a technical / programming perspective, or how from a design / aesthetic perspective?

If the latter, you'd probably want to ask in the Web Site Designers forum.

Hope this helps,
Dan


[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
the former. I want to know how to actually implement this feature.

regards
chris
 
well i am using a package called infoglue to create this website so im not sure if you are familiar with it but here is the code that is creating the navigation bar:

<div id="Nav1">
<span class="Nav1Text">
<table border = "0" align="$templateLogic.componentLogic.getPropertyValue("alignment")">
<tr>
<td>
#foreach($webpage in $templateLogic.getComponentLogic().getBoundPages("pages"))
<a href="$webpage.url" class="Nav1TextLink">$webpage.navigationTitle</a>
#end
</td>
</tr>
</table>

basically it is a table, with a single row and the #foreach part is simply iterating through the directories added to the navigation list. which then places the title as a link within a <td> tag. what i want is for a link to wrap to the next line if it it runs over. so that i dont have links going over 2 lines.

regards,
chris
 
If you don't want individual links to be split across lines, put this in your stylesheet:
Code:
#Nav1 a { white-space: nowrap }
Btw, what's the span and the single-cell table for? You should be able to do all you need with just the <div>.

-- Chris Hunt
Webmaster & Tragedian
Extra Connections Ltd
 
its ok i have removed the table part. however now the remaining two links have been cut off at the edge of the browser window. I want them to appear on the next line, within the navigation bar which is a background image.

regards
chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top