Categories:
.NET (357)
C (330)
C++ (183)
CSS (84)
DBA (2)
General (7)
HTML (4)
Java (574)
JavaScript (106)
JSP (66)
Oracle (114)
Perl (46)
Perl (1)
PHP (1)
PL/SQL (1)
RSS (51)
Software QA (13)
SQL Server (1)
Windows (1)
XHTML (173)
Other Resources:
How To Use IDs to Override Classes
How To Use IDs to Override Classes? - CSS Tutorials - Introduction To CSS Basics
✍: FYIcenter.com
Class is a nice way to separate a group of tag instances. To identify one or two special instances, you can use the ID attributes and ID selectors. In the CSS example below, the ID selector "P#hot" wins over all other selectors, so the third row in the table will be in red:
<html><head>
<title>CSS Included</title>
<style type="text/css">
/* matches P instances with id="hot" only */
P#hot {color: red}
/* matches P instances with class="url" only */
P.url {margin-top: 0px; margin-left: 20px;
font-family: sans-serif; fond-weight: bold}
/* matches P instances inside TABLE only */
TABLE P {margin-top: 0px; margin-left: 40px;
font-family: serif; font-size: 12pt; color: blue}
/* matches all instances of tag P */
P {font-family: arial; font-size: 14pt; color: black}
</style>
</head><body>
<p>Welcome to FYICenter.com resource listings:<br>
<table>
<tr><td><p class="url">www.w3.org</p></td>
<td><p>W3 home page.<p></td></tr>
<tr><td><p class="url">www.php.net</p></td>
<td><p>PHP home page.<p></td></tr>
<tr><td><p class="url" id="hot">www.google.com</p></td>
<td><p id="hot">Google search.<p></td></tr>
</table>
</body></html>
2007-05-11, 4953👍, 0💬
Popular Posts:
How To Create an Add-to-Netvibes Button on Your Website? - RSS FAQs - Adding Your Feeds to RSS News ...
What is hashing? To hash means to grind up, and that's essentially what hashing is all about. The he...
How To Write a Minimum Atom 1.0 Feed File? - RSS FAQs - Atom Feed Introduction and File Generation I...
How To View All Columns in an Existing Table? - Oracle DBA FAQ - Managing Oracle Database Tables If ...
What are shared (VB.NET)/Static(C#) variables? Static/Shared classes are used when a class provides ...