Advanced Web Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsWeb DesignAdvanced Web Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old November 13th, 2003, 07:14 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 9 m 52 sec
Reputation Power: 10
Send a message via ICQ to stumpy Send a message via MSN to stumpy
CSS/XHTML - Lists for navigation

Hey guys,

Just thought I'd share with you my latest creation - a CSS & XHTML (Strict) page, which uses lists (<ul>) for navigation.

I have two forms of lists on the page - one utilises INLINE lists, allowing the menu to run horizontally across the page, while the other uses the default, block level method - and runs vertically.

View the page here: http://www.bluesix.com.au/dev/cssxhtml/list_nav.htm

And the CSS here: http://www.bluesix.com.au/dev/cssxhtml/styles.css

Reply With Quote
  #2  
Old November 14th, 2003, 07:28 AM
Joe4JC Joe4JC is offline
The name's Joe. Yours?
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Aug 2002
Location: Lurking in the shadows...
Posts: 147 Joe4JC User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Your css falls apart in Mozilla 1.5. Take a look here for inspiration.
__________________
Check out 4Life today!

Reply With Quote
  #3  
Old November 14th, 2003, 09:28 AM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 8
Send a message via ICQ to dhouston
Looks alright in Mozila 1.5 on my system, assuming the subnav is already supposed to be expanded.

Reply With Quote
  #4  
Old November 14th, 2003, 11:38 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 9 m 52 sec
Reputation Power: 10
Send a message via ICQ to stumpy Send a message via MSN to stumpy
Almost got it going in Mozilla 1.5 now - though it seems to have busted up IE a little. For some reason I can't get the main nav centered (left aligned w/ the content), with it's background color filling the remainder space. Any ideas?

It should end up looking like this: http://bluesix.com.au/dev/cssxhtml/list_nav_demo.gif
__________________
DevArticles Moderator
BlueSix - Web Development and Consulting

Reply With Quote
  #5  
Old November 19th, 2003, 02:51 AM
INF INF is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Woodland, WA
Posts: 26 INF User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
This doesn't solve the alignment issue, but
if you replace the <br clear="both" /> with:
Code:
<div style="clear:both;"></div>

it will at least validate. It also takes away the space the <br /> put in on IE.
Hack? Yes, but it validates.

Reply With Quote
  #6  
Old November 19th, 2003, 03:10 AM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 9 m 52 sec
Reputation Power: 10
Send a message via ICQ to stumpy Send a message via MSN to stumpy
You rock INF. It's almost there.

I've got the main nav background color filling up the rest of the row that it sits on, in IE, but alas, Mozilla ain't playin' ball. Soooo close.

Reply With Quote
  #7  
Old November 19th, 2003, 01:36 PM
INF INF is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Woodland, WA
Posts: 26 INF User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Got it!
Here's a link to the page
And the CSS
In case the site is down here's what I did.
I added this to the css
Code:
#navwrap {
	background-color : #7A7764;
	height:25px;
}
#break {
	clear:both;
}

I moved the <h1> and #nav list inside the container, and placed the #nav list inside a new #navwrap div which allows the color to stretch. the #break is just the solution I posted earlier.
Code:
<div id="container">

	<h1>Lorem ipsum</h1>
	<div id="navwrap">
		<ul id="nav">
			<li><a href="#" title="Home">Home</a></li>
			<li><a href="#" title="Articles">Articles</a></li>
			<li><a href="#" title="Members">Members</a></li>
			<li><a href="#" title="Register">Register</a></li>
	
			<li><a href="#" title="Projects">Projects</a></li>
		</ul>
	</div>

	<div id="break"></div>
		
<div id="secondarynav">
 <!-- AND SO ON.....-->


I also attached the files, as I really don't trust the free-server the example is on.
Attached Files
File Type: zip list_nav_demo.zip (2.5 KB, 637 views)

Reply With Quote
  #8  
Old November 19th, 2003, 03:39 PM
stumpy's Avatar
stumpy stumpy is offline
May contain nuts.
Dev Articles Regular (2000 - 2499 posts)
 
Join Date: Aug 2002
Location: Sydney, AU
Posts: 2,058 stumpy User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 5 h 9 m 52 sec
Reputation Power: 10
Send a message via ICQ to stumpy Send a message via MSN to stumpy
That's it! Nice one INF. I've made a few modifications to your suggestions, mainly leaving the H1 and nav out of the main container (just needed to make a few small mods to the nav container). I've also made the "break" a class, so it can be re-used, if needed.

http://bluesix.com.au/dev/cssxhtml/list_nav.htm

I had hoped to do it without using a containing div around the nav... not sure why it worked it in IE without one. I'm not real keen on having to assign a height to the nav container either, as it means I have to change two classes when altering the main nav appearance.

Reply With Quote
  #9  
Old November 19th, 2003, 05:57 PM
INF INF is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Nov 2003
Location: Woodland, WA
Posts: 26 INF User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
Quote:
Originally posted by stumpy
...I've also made the "break" a class, so it can be re-used, if needed.


Whoops, meant to do that.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsWeb DesignAdvanced Web Development > CSS/XHTML - Lists for navigation example


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump




 Free IT White Papers!
 
How to Present Effectively Online
This white paper offers practical and actionable advice on the key steps that any presenter should consider as they plan and execute a Webinar or online meeting.

Request Your Free Technology Downloads!
 
Open Source Security Myths
Open Source Software (OSS) is computer software whose source code is available to the general public with relaxed or non-existent intellectual property restrictions (or arrangement such as the public domain), and is usually developed with the input of many contributors.

Request Your Free Technology Downloads!
 
Power and Cooling Capacity Management for Data Centers
This paper describes the principles for achieving power and cooling capacity management.

Request Your Free Technology Downloads!
 
Scalable, Fault-Tolerant NAS for Oracle - The Next Generation
For several years NAS has been evolving as a storage alternative for Oracle databases, and for good reason: NAS is quite often the simplest, most cost-effective storage approach for Oracle. Learn about the benefits that HP's approach to scalable NAS brings to Oracle environments in this comprehensive white paper.

Request Your Free Technology Downloads!
 
Understanding Web Application Security Challenges
This white paper discusses many common threats and preventive measures for Web application security, and explains what you can do to help protect your organization.

Request Your Free Technology Downloads!
 

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 




© 2003-2009 by Developer Shed. All rights reserved. DS Cluster 2 Hosted by Hostway
For more Enterprise Application Development news, visit eWeek