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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Explain why href text is double-space on wrap? 2

Status
Not open for further replies.

thedaver

IS-IT--Management
Jul 12, 2001
2,741
US
Using this page as an example:


Can someone help explain, or better yet aid me in controlling, the effect I see where the href links on the left menu are being double-spaced when they wrap?

This has the visual effect of sort of blending the links together. I'd prefer to have some sort of blank space between links with any given link's text single/mono-spaced.

Much appreciated in advance!

D.E.R. Management - IT Project Management Consulting
 
It's down to the line-spacing of 20px in your "p" rule:

Code:
p {
	font:11px/[!]20px[/!]

If you remove it, the spacing goes away.

However, I'd advise re-coding your nav menu to be a list, and turning the bullets off with styles. It will look the same (without the extra line spacing, of course), and will be more semantically correct (it's a list of links - so use a list element).

Something like this:

Remove the existing "#navAlpha" and "body>#navAlpha" CSS rules, replacing them with:

Code:
#navAlpha {
	position:absolute;
	width:128px;
	top:10px;
	left:20px;
	border:1px dashed black;
	background-color:#eee;
	padding:10px;
	z-index:2;
}

#navAlpha ul, #navAlpha li {
	list-style-type: none;
	padding: 0px;
	margin: 0px;
}

#navAlpha li {
	margin-bottom: 10px;
}

and then replace the whole "navAlpha" DIV element with:

Code:
<div id="navAlpha">
	<h2>Links</h2>
	<ul>
		<li>Home</li>
		<li><a href="disaster_recovery_sites">Disaster Recovery Sites</a></li>
		<li><a href="disaster_recovery_plan">Disaster Recovery Plans</a></li>
	</ul>
</div>

Hope this helps,
Dan

[tt]Dan's Page [blue]@[/blue] Code Couch
[/tt]
 
Your line height on the paragraph that the navigation list is inside has a line-height of 20px. So every line will be 20px high, thus making it look like it is double spaced. The question is what exactly you want to do. Also, you might consider that for what you're doing, list could be a better element:
 
WOW! Thanks for the VERY QUICK and considerate responses.
I'll work those offline and should be able to solve the problem with your kind guidance.

Many thanks, stars to you!

D.E.R. Management - IT Project Management Consulting
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top