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
Need help with inline list
Old 01-07-2009, 07:06 AM Need help with inline list
Novice Talker

Posts: 6
Name: Allen
Trades: 0
I would like to remove the "pipe" character from my last item. Is there anyway to do it with css, or is this a javascript issue? I've tried to add a ".last" class to my last item, but it did not work.

html:
Code:
<div id="nav">
	<ul>
		<li><a href="#">Home</a></li>
		<li><a href="#">Articles</a></li>
		<li><a href="#">FAQ</a></li>
		<li><a href="#">Links</a></li>
        <li class="last"><a href="#">Contact Us</a></li>

	</ul>
  	</div>

css:
Code:
#nav {
	width: 780px;
	height: 49px;
	margin-top: -1em;
}
#nav ul {
	list-style: none;
	background: url(../images/navbg2.png) repeat-x;
	height: 49px;
	padding-top: 0.7em;
	padding-left: .7em;
}
#nav ul li a {
	text-align: center;
	text-decoration: none;
	color: #FBF9F9;
}
#nav ul li {
	display: inline;
	font: 1em FontLogic;
	text-transform: uppercase;
	border-right: 1px solid #C96;
	padding-right: 2em;
	padding-left: 2em;
}
.last {
	border-style: none;
	border-width: 0px;
}
Web4Real is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 01-07-2009, 07:10 AM Re: Need help with inline list
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
the ID will take priority over the class rule only.

#nav ul li.last {
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-07-2009, 08:50 AM Re: Need help with inline list
Novice Talker

Posts: 6
Name: Allen
Trades: 0
So what are my options?
Web4Real is offline
Reply With Quote
View Public Profile
 
Old 01-07-2009, 09:29 AM Re: Need help with inline list
stoot98's Avatar
Ultra Talker

Posts: 427
Name: Stuart
Location: Glasgow, Scotland
Trades: 0
Replace your .last class with...

Code:
#nav ul li.last {
	border-style: none;
	border-width: 0px;
}
Shouldnt need to change your HTML
stoot98 is offline
Reply With Quote
View Public Profile
 
Old 01-07-2009, 10:22 AM Re: Need help with inline list
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Yes.

it appears I missed out the word "use" from inbetween "... class rule only." and "#nav ul li.last {"

__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 01-07-2009, 07:15 PM Re: Need help with inline list
Novice Talker

Posts: 6
Name: Allen
Trades: 0
Awesome! Thanks guys
Web4Real is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Need help with inline 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.50673 seconds with 12 queries