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.
|
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|||
|
|||
(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 |
|
|||
|
|||
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 |



Linear Mode
