rgb192
asked on
how to overwrite a font property on <li>
how to overwrite a font property on <li>
I only want <li> to stay the same, not the other text
so h1 is bigger
and you cant change this line:
<li><font size="2">I want this font to be 12px</font></li>
reason:
I am working with alot of copy paste text and want the all the fonts to be the same
I only want <li> to stay the same, not the other text
so h1 is bigger
and you cant change this line:
<li><font size="2">I want this font to be 12px</font></li>
reason:
I am working with alot of copy paste text and want the all the fonts to be the same
But you have to change that line because the 'font' tag overrides the setting for the 'li'.
This will be enough: font {font-size:12px;}
ASKER
but how to change h1
h1 {font-size:18px;}
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Make sure you make a backup first. If something goes wrong you can always roll back. I usually make a copy and work on that. When I'm satisfied everything is proper, I swap.
ASKER
best solution
the <font ... tag is deprecated
anyhow, try this:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>...</title>
<style>
/**/
.test ul {
font-size:12px;
color: #cc0000;
}
.test li {
font-size:12px;
color: #cc0000;
}
.test font {
font-size:12px;
color: #cc0000;
}
</style>
</head>
<body>
<div class='test'>
<ul>
<li><font size="1">I want this font to be 12px</font></li>
<li><font size="1">I want this font to be 12px</font></li>
<li style="font-size:12px;">I want this font to be 12px</li>
</ul>
</div>
<ul>
<li><font size="1">I want this font to be 12px</font></li>
<li><font size="1">I want this font to be 12px</font></li>
<li style="font-size:12px;">I want this font to be 12px</li>
</ul>
</body>
</html>