•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the JavaScript / DHTML / AJAX section within the Web Development category of DaniWeb, a massive community of 403,361 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 4,301 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our JavaScript / DHTML / AJAX advertiser: Lunarpages Web Hosting
Views: 345 | Replies: 2
![]() |
| |
•
•
Join Date: Jan 2008
Posts: 29
Reputation:
Rep Power: 1
Solved Threads: 0
I'm trying to correct some W3C validation errors found at www.logicweb.com
I'm not a designer by trade, but I learn quickly and would appreciate help on this.
The code used for the view packages button is below, and the one that caused W3C errors
W3C Error
Line 283, Column 10: ID "view_packages" already defined.
Regardless, the button works both hovering (color change) and link works. If I change ID to class, I end up see the text over the button, and the hover color change becomes ineffective.
If I remove the text, it goes away yet hover still does not work at all.
Using below doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Thanks in advance.
I'm not a designer by trade, but I learn quickly and would appreciate help on this.
The code used for the view packages button is below, and the one that caused W3C errors
<div id="view_packages"> <h4><a class="view_packages_button" href="/services/hosting.php" >View Packages</a></h4> </div>
W3C Error
Line 283, Column 10: ID "view_packages" already defined.
Regardless, the button works both hovering (color change) and link works. If I change ID to class, I end up see the text over the button, and the hover color change becomes ineffective.
If I remove the text, it goes away yet hover still does not work at all.
Using below doctype
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Thanks in advance.
Talk Jesus Forums [ Over 100 Fulfilled Prophecies in the Bible: click here ]
.....................................................................................
LogicWeb...a smart web solution [ hosting for personal and business since 2004 ]
.....................................................................................
LogicWeb...a smart web solution [ hosting for personal and business since 2004 ]
•
•
Join Date: Apr 2005
Location: New York state
Posts: 458
Reputation:
Rep Power: 5
Solved Threads: 68
You cannot have more than one element use the same ID, that is what is causing the error. IDs are meant to be unique identifiers, classes are meant to be reusable.
ie.,
ie.,
css Syntax (Toggle Plain Text)
#head h2.highlight{color:#FF0000;} #body h2.highlight{color:#0000FF;} h2.highlight{color:#00FF00;}
html Syntax (Toggle Plain Text)
<div id="head"> <!-- this will be red --> <h2 class="highlight">Hello World</h2> </div> <div id="body"> <!-- this will be blue --> <h2 class="highlight">Hello World</h2> </div> <!-- This will be green --> <h2 class="highlight">Hello World</h2>
Last edited by ShawnCplus : Mar 12th, 2008 at 9:21 pm.
GCS d- s+:+ a-->? C++(++++) UL+++ P+>+++ L+++ !E--- W+++
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r z+*
N+ o K w++(---) O? !M- V PS+>++ PE+ Y+ PGP !t- 5? X- R tv+
b+>++ DI+ D G++>+++ e+ h+>++ r z+*
•
•
Join Date: Jan 2008
Posts: 29
Reputation:
Rep Power: 1
Solved Threads: 0
Thanks for your help. I have changed it to class and within the css sheet changed # to . instead.
Thanks again.
Thanks again.
Talk Jesus Forums [ Over 100 Fulfilled Prophecies in the Bible: click here ]
.....................................................................................
LogicWeb...a smart web solution [ hosting for personal and business since 2004 ]
.....................................................................................
LogicWeb...a smart web solution [ hosting for personal and business since 2004 ]
![]() |
•
•
•
•
•
•
•
•
DaniWeb JavaScript / DHTML / AJAX Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
Similar Threads
- LogicWeb Review (Website Reviews)
- LogicWeb / CSS Question (HTML and CSS)
Other Threads in the JavaScript / DHTML / AJAX Forum
- Previous Thread: call function
- Next Thread: Help!


Hybrid Mode