It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming CSS Forum

#

#

Postby LucasZ21 on Thu Jun 14, 2007 2:29 pm

Hey, I just taught myself CSS...

I don't think I understand the "#" thing.

Code: Select all
#nameofDiv {
properties here
}


Okay, say that is my code. When I go into my code and create a div with the ID of "nameofDiv", it will take on all of the properties as in the CSS code. Right?
Image
User avatar
LucasZ21
100+ Club
 
Posts: 195
Joined: Mon Feb 26, 2007 2:31 am
Location: Mansfield, OH

Postby jberry on Thu Jun 14, 2007 3:47 pm

right
jberry
100+ Club
 
Posts: 144
Joined: Mon Mar 19, 2007 4:40 pm
Location: Atlantic City, NJ

Postby LucasZ21 on Thu Jun 14, 2007 4:14 pm

Thanks, that helps a lot
Image
User avatar
LucasZ21
100+ Club
 
Posts: 195
Joined: Mon Feb 26, 2007 2:31 am
Location: Mansfield, OH

Postby knifeinback on Fri Jul 27, 2007 11:15 am

# defines it as ID.
. defines it as a class.

so

.div{
css}

would be displayed with:
<div CLASS="div"></div>

#div{
css}

would be displayed with
<div ID="div"></div>
User avatar
knifeinback
100+ Club
 
Posts: 136
Joined: Fri Jul 27, 2007 10:41 am
Location: 4170: Brisbane

Postby LucasZ21 on Tue Aug 14, 2007 1:13 am

knifeinback wrote:# defines it as ID.
. defines it as a class.

so

.div{
css}

would be displayed with:
<div CLASS="div"></div>

#div{
css}

would be displayed with
<div ID="div"></div>


ahhh...even more helpful
Image
User avatar
LucasZ21
100+ Club
 
Posts: 195
Joined: Mon Feb 26, 2007 2:31 am
Location: Mansfield, OH

Postby explorer07 on Tue Aug 14, 2007 10:19 am

The ID can only be used once on a page, its unique, and used for headers, footers in a typical layout style sheet.

Where as class is more versatile, can be used numerous times.
explorer07
 
Posts: 23
Joined: Thu Aug 09, 2007 12:00 am


Who is online

Users browsing this forum: No registered users and 0 guests