-
How would I get H1 width to be the size of the text it contains. Right now, using IE5.5, the text is centered but the white box its in takes up 100% of the screen width. I could say width:500; or something but that's not too efficient.
Code:
<style type="text/css">
<!--
body {
text-align: center;
font-family: Arial;
background: black;
}
a:hover {
color: red;
}
h1 {
background: white;
color: black;
}
-->
</style>
Thanks,
Josh
-
How about something like this:
Code:
<H1 ALIGN="center"><B STYLE="{ background-color: C0C0C0; color: 000000; }">Hello World!</B></H1>
It does the background coloring using a tag embedded in the H1 and limits the extent of the coloring.
Paul
-
I'm using a global style sheet so I can change the style of about 30 ASP-dynamically-generated pages all at once, so that is about the same as using the
<h1><span>Something</span></h1>
I came up with and setting the <span> tag in the stylesheet.
Thanks,
Josh