User Name Password Register
DaniWeb IT Discussion Community
All
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 361,626 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 2,206 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: 307 | Replies: 2
Reply
Join Date: Jan 2008
Posts: 24
Reputation: LogicWeb is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
LogicWeb LogicWeb is offline Offline
Newbie Poster

Help LogicWeb CSS

  #1  
Mar 12th, 2008
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

	<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.
Attached Images
File Type: gif 1.gif (3.0 KB, 0 views)
Talk Jesus Forums [ Over 100 Fulfilled Prophecies in the Bible: click here ]
.....................................................................................
LogicWeb...a smart web solution [ hosting for personal and business since 2003 ]
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Apr 2005
Location: New York state
Posts: 438
Reputation: ShawnCplus will become famous soon enough ShawnCplus will become famous soon enough 
Rep Power: 5
Solved Threads: 61
Sponsor
ShawnCplus's Avatar
ShawnCplus ShawnCplus is offline Offline
Code Monkey

Re: LogicWeb CSS

  #2  
Mar 12th, 2008
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.,
  1. #head h2.highlight{color:#FF0000;}
  2. #body h2.highlight{color:#0000FF;}
  3. h2.highlight{color:#00FF00;}
  1. <div id="head">
  2. <!-- this will be red -->
  3. <h2 class="highlight">Hello World</h2>
  4. </div>
  5. <div id="body">
  6. <!-- this will be blue -->
  7. <h2 class="highlight">Hello World</h2>
  8. </div>
  9. <!-- This will be green -->
  10. <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+*
Reply With Quote  
Join Date: Jan 2008
Posts: 24
Reputation: LogicWeb is an unknown quantity at this point 
Rep Power: 1
Solved Threads: 0
LogicWeb LogicWeb is offline Offline
Newbie Poster

Re: LogicWeb CSS

  #3  
Mar 12th, 2008
Thanks for your help. I have changed it to class and within the css sheet changed # to . instead.

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 2003 ]
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

DaniWeb JavaScript / DHTML / AJAX Marketplace
Thread Tools Display Modes

Similar Threads
Other Threads in the JavaScript / DHTML / AJAX Forum

All times are GMT -4. The time now is 6:30 am.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC