Let me elaborate my question.
For
, I am using following code:
Code:
<html>
<head>
</head>
<body>
<img src="http://www.urdufans.com/forum/ls/admin.gif" style="border: 0pt none;"> <span style="color: #FF0000; background-image: url('http://www.urdufans.com/forum/bg/admin.gif')"><b>Mujahid Taban</b></span>
</body>
</html>
Now I want to use an external CSS file in order to reduce my code becasue I have to use "Mujahid Taban" many times in the page. You have suggested me following CSS and HTML:
In style.css file:
Code:
img{
border:none;
}
#heart{
color: #FF0000;
background-image: url('http://www.urdufans.com/forum/bg/admin.gif');
}
In index.html file:
Code:
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
</head>
<body>
<img src="http://www.urdufans.com/forum/ls/admin.gif"> <span id="heart"><strong>Mujahid Taban</strong></span>
</body>
</html>
That reduced the code a little but I want only following code in HTML:
Code:
<span id="heart">Mujahid Taban</span>
Everything else should too be in external CSS. What CSS code I should use for LEFT SIDE image (heart) and for removing strong.
Bookmarks