The text-decoration is on the parent element so will apply for the full width. even though the child span has no text-decoration it is part of the parent heading, so the parent underline continues through.
change the colour of the child span and you will see that the underline colour remains as the parent colour.
so add another span with NO underline and remove the text decoration from the parent
HTML Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<title>Untitled Page</title>
<style type="text/css">
h1 {
font-size:18px;
font-family:"Arial";
padding-bottom:5px;
color: #B37E13;
text-align: center;
font-weight: bold;
}
h1 span.ul {
text-decoration:underline;
}
h1 span.noul {
font-family:"Trebuchet MS";
display:block;
font-size:10px;
color: #a1701b;
text-align:center;
text-decoration:none;
}
</style>
</head>
<body>
<h1><span class="ul">Hot & Cold Buffet <span><span class="noul">(Minimum 50 People)</span></h1>
</body>
</html>
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
|