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.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Is this a case of div-itis? Would ULs & LIs be better?
Old 05-29-2007, 04:21 AM Is this a case of div-itis? Would ULs & LIs be better?
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
Sorry to be asking so many questions all of a sudden; I've put a tremendous amount of work into overhauling my site lately. I think I've made a lot of progress, although I have plenty of work to go. But in the meantime, I have a navigation system that's less intrusive, and works.

My site is organized as a hierarchy, and UL/LI/UL/LI tags represent that better than just divs with a elements inside them. But it seems kind of like a return to tables, which I've been working hard to stamp out on even the more obscure pages on my site ... wrapping the real code ( the links ) in lots of extra tags.

So I was hoping I could talk people into having a look at the source for the navigation ( at the top of the page ) and giving me a second opinion about whether I'm over-using divs, or if there's a better way in general?

A good example would be Waterfall, Glacier National Park, Montana.

Thanks!
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
 
Register now for full access!
Old 05-29-2007, 12:24 PM Re: Is this a case of div-itis? Would ULs & LIs be better?
willcode4beer's Avatar
Super Moderator

Posts: 1,533
Name: Paul Davis
Location: San Francisco
Trades: 1
I would recommend starting by thinking about what the information is you are trying to present.
For example, a list of menu items is a good use for UL/LI (list items )

In a case where you are defining something like the section:
HTML Code:
<h1>Cascading Falls, Glacier National Park</h1>        
        <div id="photographInfo">
            <div class="photoInfoLabel">Location:
...
I would use a definition list:
HTML Code:
<dl>
        <dt>Cascading Falls, Glacier National Park</dt>
        <dd class="photoInfoLabel">Location: Glacier National Park, Montana</dd>
        <dd class="photoInfoLabel">Date: July 25, 2002</dd>
...
With some CSS you could eliminate most, if not all of the BR tags.

Just my thoughts
__________________

Please login or register to view this content. Registration is FREE

willcode4beer is offline
Reply With Quote
View Public Profile
 
Old 05-29-2007, 02:47 PM Re: Is this a case of div-itis? Would ULs & LIs be better?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
I agree The menu is definitely best done with lists, and the definition list is the way to go on the other. I've used DL's for several things and it works out well. I've floated DT's and DD's to place things where I want them.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 05-29-2007, 02:58 PM Re: Is this a case of div-itis? Would ULs & LIs be better?
ForrestCroce's Avatar
Half Man, Half Amazing

Posts: 3,023
Name: Forrest Croce
Location: Seattle, WA
Trades: 0
Wow, that's not even what I was asking/worried about, and people gave me valuable feedback. This is the first I've heard of definition lists, so it sounds like I've got some reading to do. Quick question on that, before I start changing my code: I can still use width, padding, and margin to force the labels ( Location:, Date:, Exposure: ) and values ( Kansas, 1/1/04, etc ) to line up the way they are now?

The nav menus at the top of the page ( much better than on the left ), could anybody tell me why ULs and LIs are better suited? I sort of get the feeling I might be relying too much on divs for that, but I'm not sure how unordered lists would improve things?

And would the structure look something like this?

Galleries
> Landscapes
-> Rockies
-> Sierra
> Cityscapes
-> Seattle
Articles
...

With sets of ULs embedded inside LIs?
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
ForrestCroce is offline
Reply With Quote
View Public Profile Visit ForrestCroce's homepage!
 
Old 05-29-2007, 03:06 PM Re: Is this a case of div-itis? Would ULs & LIs be better?
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Quote:
I can still use width, padding, and margin to force the labels ( Location:, Date:, Exposure: ) and values ( Kansas, 1/1/04, etc ) to line up the way they are now?
Absolutely. You can style each part of a DL - the DL itself, the DT and the DD elements. They are very versatile, I a DL here - on the Office Hours:
http://tinyurl.com/342o7q

Your structure would be right:
<dl>
<dt>Landscapes</dt>
<dd>Rockies</dd>
<dd>Sierra</dd>
</dl>
Stu Nichols uses a DL for navigation here:
http://www.cssplay.co.uk/menus/definition.html
He's got several versions:
http://www.cssplay.co.uk/menus/index.html
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Is this a case of div-itis? Would ULs & LIs be better?
 

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