Greenguy's Board


Go Back   Greenguy's Board > General Business Knowledge
Register FAQ Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
Old 2013-05-16, 12:27 PM   #1
Simon
That which does not kill us, will try, try again.
 
Simon's Avatar
 
Join Date: Aug 2003
Location: Conch Republic
Posts: 5,150
Send a message via ICQ to Simon Send a message via AIM to Simon Send a message via Yahoo to Simon
Quote:
...compound css and using nested div tags ... Dreamweaver
Looks good, and even using Dreamweaver you managed mostly to avoid the dreaded divitis and classitis that it's notorious for causing.

A couple of things you may want to consider on your cleos-porn-links pages. You likely know that a class can be applied to as many elements as you want, while an ID should only be applied once to one element on any page/document. So having many divs with an ID of navcontainer probably isn't what you meant to do.

You could just convert the navcontainer to a class instead of an ID so you can use it multiple times. And then in the interest of avoiding all divitis, you can consider applying that new navcontainer class directly to the ULs themselves instead of wrapping each list in a div too.

Just wanted to mention those things before you have too many pages done.

HTH

__________________
"If you're happy and you know it, think again." -- Guru Pitka
Simon is offline   Reply With Quote
Old 2013-05-16, 12:34 PM   #2
Cleo
Subversive filth of the hedonistic decadent West
 
Cleo's Avatar
 
Join Date: Mar 2003
Location: Southeast Florida
Posts: 27,936
Quote:
Originally Posted by Simon View Post
You likely know that a class can be applied to as many elements as you want, while an ID should only be applied once to one element on any page/document. So having many divs with an ID of navcontainer probably isn't what you meant to do.

You could just convert the navcontainer to a class instead of an ID so you can use it multiple times. And then in the interest of avoiding all divitis, you can consider applying that new navcontainer class directly to the ULs themselves
Yeah that was some old code that was reused. One of the few bits of old code that was reused.

I noticed that I had done that late last night. It seemed to be working so I left it alone but I do know that it's wrong.

But I just changed all the IDs to classes.
__________________
Free Rides on Uber and Lyft
Uber Car: uberTzTerri
Lyft Car: TZ896289
Cleo is offline   Reply With Quote
Old 2013-05-16, 01:34 PM   #3
Simon
That which does not kill us, will try, try again.
 
Simon's Avatar
 
Join Date: Aug 2003
Location: Conch Republic
Posts: 5,150
Send a message via ICQ to Simon Send a message via AIM to Simon Send a message via Yahoo to Simon
Yep, most browsers will let you get away with reusing IDs, at least right now. But if that ever changes in future browser versions you'll be very glad you changed those to classes.

--

You rarely need to use IDs instead of classes, except when you really want to indicate that some element on the page is actually unique.

For example, if an element has an ID of "submit_here" and you have a link that says "http://yourdomain.com#submit_here" then the browser will automatically scroll the page to find and show that section to whoever clicks the link.

The other reason to use an ID instead of a class is for Javascript. For example, if you're using the popular jQuery or similar Javascript libraries, then things like the "getElementById" function rely on there being only one element with the ID you specify.

Also, to go along with those things, while an element can have more than one class applied to it, an element can only have one ID.

Aside from those things, according to the "cascading" rules in CSS, an ID is chosen over a class if there are any conflicts in CSS declarations.

There may be other reasons to use an ID instead of a class, but those are the ones that first come to mind.

traffic is more important than design
__________________
"If you're happy and you know it, think again." -- Guru Pitka
Simon is offline   Reply With Quote
Reply


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

Forum Jump


All times are GMT -4. The time now is 10:15 AM.


Mark Read
Powered by vBulletin® Version 3.8.1
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
© Greenguy Marketing Inc