External CSS Sheet

Reply

Join Date: Nov 2007
Posts: 1
Reputation: ralph w is an unknown quantity at this point 
Solved Threads: 0
ralph w ralph w is offline Offline
Newbie Poster

External CSS Sheet

 
0
  #1
Nov 28th, 2007
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.
Reply With Quote Quick reply to this message  
Join Date: Jan 2007
Posts: 3,210
Reputation: MidiMagic has a spectacular aura about MidiMagic has a spectacular aura about 
Solved Threads: 164
MidiMagic's Avatar
MidiMagic MidiMagic is offline Offline
Nearly a Senior Poster

Re: External CSS Sheet

 
0
  #2
Dec 1st, 2007
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.
Daylight-saving time uses more gasoline
Reply With Quote Quick reply to this message  
Join Date: Dec 2007
Posts: 72
Reputation: innovativeatul has a little shameless behaviour in the past 
Solved Threads: 0
innovativeatul's Avatar
innovativeatul innovativeatul is offline Offline
Junior Poster in Training

Re: External CSS Sheet

 
0
  #3
Dec 1st, 2007
you have to use a unique id for each tag, this is very important point while writing style sheet.
Reply With Quote Quick reply to this message  
Join Date: Nov 2007
Posts: 4
Reputation: cashu is an unknown quantity at this point 
Solved Threads: 0
cashu cashu is offline Offline
Newbie Poster

Re: External CSS Sheet

 
0
  #4
Dec 1st, 2007
i had the same problem.
thanks
cashu
http://tech-unite.com/forum/viewtopic.php?f=5&t=10
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC