CSS: apply formatting to tag contents only
Normally CSS classes change formatting of tags themselves. For example a
following code
<head>
<style type="text/css">
.r {background-color:green; color:white; font-weight:bold}
</style>
</head>
<body>
<ul>
<li>Item 1</li>
<li class="r">Item 2</li>
<li>Item 3</li>
<li class="r">Item 4</li>
<li>Item 5</li>
</ul>
</body>
makes items with "r" class to appear without a bullet and with
background-color to whole page width.
How to apply formatting not to the tag itself, but to contents only
WITHOUT HAVING TO PUT AN ADDITIONAL TAG INSIDE ?
No comments:
Post a Comment