Technology, Web & Business Forum

You are here: Technology, Web & Business Forum : Web Development : Design : Need CSS help please!?


Welcome to the Technology, Web & Business Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.


Design Talk about web design techniques and ideas in CSS, HTML, etc.


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-04-2008
Junior Member
 
Join Date: May 2008
Posts: 1
Default Need CSS help please!?

Hey,
Can any help me explain how the CSS syntax can be applied to multiple tags,nested tags and classes of tag?

Thankyou
__________________
Powered by Yahoo! Answers
Reply With Quote
  #2 (permalink)  
Old 05-04-2008
Junior Member
 
Join Date: May 2008
Posts: 1
Default

(Assuming you know how to code CSS already)

To style all identical tags (such as <div>)
div{color:#000;}

To style by tag id:
#tagid{color:#f00;}
(each id can only be referenced once)

To style by class:
.tagclass{color:#0f0;}
(a class can be used on any number of tags)

To style all child tags inside another( such as all <em> tags inside a <div>)
div em{float:right;}

To style multiple tags using the same attributes (eg, all <em> and <strong> tags are green)
em, strong{color:#0f0;}

Hope this sorts out some issues.
Check the sources for more info.
__________________
Powered by Yahoo! Answers
Reply With Quote
  #3 (permalink)  
Old 05-04-2008
Junior Member
 
Join Date: May 2008
Posts: 1
Default

To style multiple tags you can use a group selector, just separate each tag you want to style by a comma.
example:
h1, h2, h3 {
**font-family: Verdana, Halvetica, sans-serif;
}

To style nested tags you can use what's called a descendant selector.
body a:link {
**text-decoration: none;
}
This styles a link nested within the body tag.

To style a class you'll use a class selector. The class selector always starts with a period (.):
.whatever {
**font-size: 24;
}
This styles an element with a class of whatever.
__________________
Powered by Yahoo! Answers
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -5. The time now is 12:07 PM.