2 replies [Last post]
OPTAdmin
Offline
Enthusiast
Dover, OH -- Soon to be Columbus, OH
Last seen: 16 years 12 weeks ago
Dover, OH -- Soon to be Columbus, OH
Joined: 2004-07-27
Posts: 108
Points: 0

I don't consider myself too much of a newbie, but this is getting sad.

I have an ID (title) on one of my div's. I use it more than once, so when I try to validate the HTML, I cannot.

What sort of changes do I need to make to the HTML/CSS in order to change it to a "class"?

I know it'll have to be...

<div class="title>

blah blah

</div>

Basically, what I'm asking is what I have to change my CSS to?

The title ID is...

#title {
background: url('http://www.ohiopreptalk.com/invp/images/header2.jpg') no-repeat;
height: 37px;
}

Thanks

I am going to be attending The Ohio State University this fall as an incoming freshman, majoring in Computer Science and Engineering.

Go Bucks!

Tony
Tony's picture
Offline
Moderator
Brisbane
Last seen: 1 week 1 day ago
Brisbane
Timezone: GMT+10
Joined: 2003-03-12
Posts: 5343
Points: 2964

ID'S and CLASSES

Hi OPTAdmin,
For classes you just use a period "." instead of a hash "#".
So for a class named title it would be

.title {
background: url('http://www.ohiopreptalk.com/invp/images/header2.jpg') no-repeat;
height: 37px;
} 

Hope that helps

OPTAdmin
Offline
Enthusiast
Dover, OH -- Soon to be Columbus, OH
Last seen: 16 years 12 weeks ago
Dover, OH -- Soon to be Columbus, OH
Joined: 2004-07-27
Posts: 108
Points: 0

ID'S and CLASSES

Okay, that's what I thought.

Thanks, Tony!

I am going to be attending The Ohio State University this fall as an incoming freshman, majoring in Computer Science and Engineering.

Go Bucks!