Join Easy-Forex, THE site for forex trading. Best Website for hosting
Download Forex Joe's Free Book
You Know Free Practice Trading Account,Trading Forex A currency trade is the simultaneous buying of one currency and selling of another one. The currency combination used in the trade is called a cross (for example, the euro/US dollar, or the GB pound/Japanese yen.). The most commonly traded currencies are the so-called "majors" – EURUSD, USDJPY, USDCHF and GBPUSD.

CSS ID

IDs allow you to assign a unique identifier to an HTML element. This allows you to define a style that can only be used by the element you assign the ID to.



CSS ID Syntax


The syntax for declaring a CSS ID is the same as for classes - except that instead of using a dot, you use a hash (#).





#id-name { property:value; }




Again, similar to classes, if you want to use the same id name for multiple elements, but each with a different style, you can prefix the hash with the HTML element name.






html-element-name#id-name { property:value; }




CSS ID Example







<head>
<style type="text/css">
h1#css-section { color:#000099 }
p#css-section { color:#999999; }
</style>
</head>
<body>
<h1 id="css-section">CSS ID</h1>
<p id="css-section">CSS IDs can be very useful</p>

</body>





This results in:






CSS ID


CSS IDs can be very useful





IDs vs Classes


Given classes and IDs are very similar, you may be wondering which one to use. This depends on the situation.


When to use classes


You should use classes when your style needs to be applied multiple times on the same page. For example, you might have many h1 elements that need the same style applied.




When to use IDs



You should use IDs if only one element on the page should have the style applied, and/or you need a unique identifier for that element. For example, you might assign an ID to a div tag which contains your left menu. The styles for this ID could contain the position, background-color, float properties, size etc. You probably wouldn't want any other element on the page to use this particular style.


Another useful thing about IDs is that you can use the Document Object Model (DOM) to refer to them. This enables you to use JavaScript/DHTML techniques to build a much more interactive web site.




Related Posts by Categories



U want get it? click here | Yul Jet

Comments :

0 comments to “CSS ID”

:)) ;)) ;;) :D ;) :p :(( :) :( :X =(( :-o :-/ :-* :| 8-} :)] ~x( :-t b-( :-L x( =))

 

Blogger Torturial

Visitor From...

Followers

Copyright © 2009 by Blogger Torturial , Help Blogger , Fixs Blogger, Techlogy today

Join Easy-Forex, THE site for forex trading. Best Website for hosting
Download Forex Joe's Free Book
Template by Blog Templste 4 U | Blogspot Tutorial