...

View Full Version : Can you use the 'name' attribute in CSS?



wobblehead
01-19-2005, 09:05 PM
In order to my rollovers working correctly in my navigation bar, I have had to use the 'name' field, where I say where the image is located which acts as a rollover. The only trouble is, when validating the home page containing the rollover navigation bar in XHTML 1.0 Strict, I have found out that the 'name' attribute of the <img> tag no longer exists. Is there anyway of using the 'name' attrribute in CSS at all, or is there some similar way of fixing the problem please?

_Aerospace_Eng_
01-19-2005, 09:16 PM
u can replace the name attribute with the id attribute :)

wobblehead
01-19-2005, 09:22 PM
Thank you for the help, I thought I was on to a winner there, but my rollover still won't work now, even though, i can get the page validated, lol, you just can't win can you? :)

wobblehead
01-19-2005, 09:24 PM
by the way, sorry for cross posting, i just thought the javascript guys may know why my rollover won't work if i just delete the 'name' attribute or use the 'id' attribute instead.

_Aerospace_Eng_
01-19-2005, 09:24 PM
think u may have to use document.getElementById('youridhere') instead of document.yournamehere not sure on that just a thought

wobblehead
01-19-2005, 09:29 PM
yeah its something like that, thanks for the help though

rmedek
01-19-2005, 11:10 PM
by the way, sorry for cross posting, i just thought the javascript guys may know why my rollover won't work if i just delete the 'name' attribute or use the 'id' attribute instead.
You mean, "sorry for triple posting," as you tacked your question onto another thread (http://codingforums.com/showthread.php?p=266146#post266146) in the HTML/CSS forum to hijack it and get your problem solved.

Nothing personal, man, but use some courtesy when asking people for help, cool? Especially when we're doing your homework (http://codingforums.com/showpost.php?p=266123&postcount=12) for you ;).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum