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
Aligning text in a menu list
Old 12-01-2010, 10:36 AM Aligning text in a menu list
Junior Talker

Posts: 2
Trades: 0
Hi Guys,

Im trying to align menu item text, so when the menu text word wraps onto the next line, it lines up with the text from the line above, rather than lining up with the block at the beginning of each line.

I look forward to any suggestions, thanks.


HTML Code:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<style type="text/css"> 
.nav {
	font-family:Verdana, Arial, Helvetica, sans-serif;
	font-size:14px;
	color:#939598;
	padding-left:5px;
	text-decoration:none;
	line-height: 20px;
	border-left-width: 10px;
	border-left-color:#B2448F;
	border-left-style: solid;
	margin-left: 10px;
	font-weight: bold;
}
</style>

<title>New Page 2</title>
</head>

<body>
	<table>
		<tr>
		<td width="150" valign="top" bgcolor="#FFFFFF" class="bg">
	
		  <a href="index.html" class="nav">home</a><br>
		  <a href="#line2" class="nav">This is the second line.</a><br>
		  <a href="#line3" class="nav">This is the third line.</a><br>
		  <a href="#line4" class="nav">This is the fourth line.</a><br>
		</td>
		</tr>
	</table>

</body>

</html>
Don. is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-01-2010, 12:26 PM Re: Aligning text in a menu list
edgray's Avatar
Super Moderator

Latest Blog Post:
Frantic
Posts: 4,264
Name: Sugarcane Gray
Location: Hell, Southern Spain
Trades: 0
you should be using an unordered list for this <ul>.
__________________

Please login or register to view this content. Registration is FREE
- a project in video and sound.

Please login or register to view this content. Registration is FREE
"Absolute Rubbish, an insult to the blues." - NME.

Please login or register to view this content. Registration is FREE
- Come use our agency :)
edgray is offline
Reply With Quote
View Public Profile Visit edgray's homepage!
 
Old 12-01-2010, 01:55 PM Re: Aligning text in a menu list
Junior Talker

Posts: 2
Trades: 0
Quote:
Originally Posted by edgray View Post
you should be using an unordered list for this <ul>.
Thanks for the suggestion.

I did try that, but the text still lines up under the block at the beginning of the text rather than under the text.

See the code below:

HTML Code:
<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">

<style type="text/css"> 
.nav {
	font-family:Verdana, Arial, Helvetica, sans-serif;
	font-size:14px;
	color:#939598;
	padding-left:5px;
	text-decoration:none;
	line-height: 20px;
	border-left-width: 10px;
	border-left-color:#B2448F;
	border-left-style: solid;
	margin-left: 10px;
	font-weight: bold;
}

#menu {
  padding:0;
  margin:0;
  }

</style>

<title>New Page 2</title>
</head>

<body>
	<table>
		<tr>
		<td width="150" valign="top" bgcolor="#FFFFFF" class="bg">
	
		  <a href="index.html" class="nav">home</a><br>
		  <a href="#line2" class="nav">This is the second line.</a><br>
		  <a href="#line3" class="nav">This is the third line.</a><br>
		  <a href="#line4" class="nav">This is the fourth line.</a><br>
<br>
<br>
<br>
<ul id="menu">
		<li><a href="index.html" class="nav">home</a></li>
		<li><a href="#line2" class="nav">This is the second line.</a></li>
		<li><a href="#line3" class="nav">This is the third line.</a></li>
		<li><a href="#line4" class="nav">This is the fourth line.</a></li>
</ul>		  
		</td>
		</tr>
	</table>

</body>

</html>
Don. is offline
Reply With Quote
View Public Profile
 
Old 12-01-2010, 03:29 PM Re: Aligning text in a menu list
edgray's Avatar
Super Moderator

Latest Blog Post:
Frantic
Posts: 4,264
Name: Sugarcane Gray
Location: Hell, Southern Spain
Trades: 0
you need to replace the bullets with your square thingies. Check out these tutorials on how to:

http://css.maxdesign.com.au/listamatic/

Basically you need a vertical list with your own bullets.
__________________

Please login or register to view this content. Registration is FREE
- a project in video and sound.

Please login or register to view this content. Registration is FREE
"Absolute Rubbish, an insult to the blues." - NME.

Please login or register to view this content. Registration is FREE
- Come use our agency :)
edgray is offline
Reply With Quote
View Public Profile Visit edgray's homepage!
 
Reply     « Reply to Aligning text in a menu list
 

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 0.62893 seconds with 12 queries