|
-
Jan 5th, 2001, 12:49 PM
#1
Thread Starter
Black Cat
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
-
Jan 9th, 2001, 12:42 PM
#2
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
-
Jan 10th, 2001, 07:46 AM
#3
Thread Starter
Black Cat
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|