Welcome to Bucaro TecHelp!

Bucaro TecHelp
Maintain Your Computer and Use it More Effectively
to Design a Web Site and Make Money on the Web

About Bucaro TecHelp About BTH User Agreement User Agreement Privacy Policy Privacy Site Map Site Map Contact Bucaro TecHelp Contact RSS News Feeds News Feeds

Victims of Sandy Hook

Stop the Slaughter of Innocents. Congress is bought and paid for by gun lunatics and gun promotion groups. If you want to live in a safe America, help buy Congress back for America. Send a donation to Mayors Against Illegal Guns, 909 Third Avenue, 15th Floor New York, NY 10022

How to Use a CSS ID Selector

A CSS id selector, which uses the pound sign (#), can be used to select one, and only one html element on a webpage (the element with its id attribute set to the same name as the name after the Id selector). Shown below is html code for a div with its id attribute set to "appbtn".

<div id="appbtn">This box was styled by the id selector #appbtn</div>

The id for an html element cannot begin with a number or a hyphen followed by a number. The id cannot contain spaces, and the only punctuation characters allowed are the hyphen (-) and the underscore (_).

Shown below is a CSS declaration block that uses the id selector to select and apply style rules to the element with its id attribute set to "appbtn".

<style type="text/css">
box-shadow: 6px 6px 4px #a0a0a0;

Note: If you need to apply the same set of style rules to multiple html elements, even to dissimilar elements, you should use a class selector. The class selector uses a dot (.) in front of the name instead of a pound sign, and the html element to receive the class used the class attribute rather than the id attribute.

RSS Feed RSS Feed

Follow Stephen Bucaro Follow @Stephen Bucaro

Web Design Sections

Fire HD
[Site User Agreement] [Privacy Policy] [Site map] [Search This Site] [Contact Form]
Copyright©2001-2016 Bucaro TecHelp 13771 N Fountain Hills Blvd Suite 114-248 Fountain Hills, AZ 85268