Jump to content
xisto Community
Sign in to follow this  
the_aggie10

Question About Css

Recommended Posts

ok well i have been recently into. to css and i have a ? say i want to select a paragraph....but i dont want it to affect all ot the paragraphs...how do i do that?

Share this post


Link to post
Share on other sites

Give the paragraph a selector, either a class or an id. Then use the selector to 'select' that (those) paragraph(s).
If there is only one like it on the page, use an 'named selector.
If there are going to be more than one of them on a page, use a (.class) selector.

use this to select a named element in your css: (only one allowed per page)

#named p { font-weight:bold;} // for bold type face<p id="named"> ... stuff here ... </p> // a 'named' selector

use this to select a class in your css: (allows several per page)
.class_name p { font-weight:bold;} // for bold type face for the class<p class="class_name"> ... stuff here ... </p> // a 'class' selector

*not tested*

Share this post


Link to post
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
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.