944,079 Members | Top Members by Rank

Ad:
Nov 28th, 2007
0

External CSS Sheet

Expand Post »
I'm not only new here but I am totally green at web design too. I'm trying to write a 3 page site for a homework assignment and I can't figure out what's wrong with my code.
All <p> tags are supposed to be indented 1.8 em, but I need to have a class named para1 where the first <p> tag on every page has no indention, and the font size is double. Here's what I wrote, but the <p> tag indention style overides the class element. Why?/


*my styles*/




body
{background-color=#999966
}


h1,h2,h3
{font-family: Comic Sans MS:sans-serif; font-style: italic; font-color: #445544; text-align: left
}



{font-family:
times new romam, sans-serif; color: black
}


p
{text-indent: 1.8em
}

para1
#para1:first-letter {float:left; font-size:200%; line-height:.5}


Thanks for your input.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
ralph w is offline Offline
1 posts
since Nov 2007
Dec 1st, 2007
0

Re: External CSS Sheet

You don't have a class named para1, you have an id named para1.

Put a period in front of an identifier to define a class.

Put a pound sign in front of an identifier to define an id.

You can't use an id, because only one tag in your web page can use a given id.
Reputation Points: 730
Solved Threads: 181
Nearly a Senior Poster
MidiMagic is offline Offline
3,314 posts
since Jan 2007
Dec 1st, 2007
0

Re: External CSS Sheet

you have to use a unique id for each tag, this is very important point while writing style sheet.
Reputation Points: 3
Solved Threads: 0
Junior Poster in Training
innovativeatul is offline Offline
72 posts
since Dec 2007
Dec 1st, 2007
0

Re: External CSS Sheet

i had the same problem.
thanks
cashu
http://tech-unite.com/forum/viewtopic.php?f=5&t=10
Reputation Points: 10
Solved Threads: 0
Newbie Poster
cashu is offline Offline
4 posts
since Nov 2007

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Flickering Sub-Menu
Next Thread in HTML and CSS Forum Timeline: Email hyperlink





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC