Jump to content

Problem With Attributes


mythusmage

Recommended Posts

Well, it is kind of subliminal, but you basically learn it through reading the HTML and CSS tutorials on this site and going through other people's sources. But if you'd like a quick run down:ID's are suggested to be used only once in a page. ID's are used, in JavaScript, to reach an element through getElementById(). In CSS, ID's are used to format only 1 element with style sheets. They are set inside the tag, like this: <a href="" id="omg" title="" /> To select IDs in stylesheets, use this (if 'blah' is the id)#blah { property:value;}And that will format only that element. (remember the # sign)Classes are exactly like ID's, except they can be used multiple times over. To select a class, just use this:.blah { property:value;}And that will format all elements with 'blah' in their class= attribute. (note the '.')Hope that helps.

Link to comment
Share on other sites

  • 1 month later...
If you read all the tutorials, especially the HTML and CSS ones, you can discover the meaning of them. It's actually hard to explain. I think you should go to them instead of me :).
joe please stop repeating answers others have already given and if you don't want to really answer their question please don't post anything.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...