Tails
01-16-2004, 08:36 AM
On a page (index.htm), I had this for styles:
<style type="text/css">
div,h2{text-align:center}
div table{width:100%}
span{font-size:large}
.l{background-color: #8060D0; width: 2%;text-align:center;color:yellow}
.c{background-color: #FFB600}
.g{background-color: #CCCCCC}
.r{background-color: #60D080;text-align:right}
.t{background-color: #D09080;width:45%}
img{border:0}
</style>
I tried linking another page in the same directory to it with the link tag.
<link rel="stylesheet" href="index.htm" />
The classes .c and .g worked fine when the page needed to use them. But when I made a <div> tag, it was not centered like it was on the main page. Why could this be? If it's related, I'm using an XHTML 1.0 Strict doctype.
EDIT: The W3C CSS validator doesn't like it, so maybe it was just another IE trick that was too good to be true.
<style type="text/css">
div,h2{text-align:center}
div table{width:100%}
span{font-size:large}
.l{background-color: #8060D0; width: 2%;text-align:center;color:yellow}
.c{background-color: #FFB600}
.g{background-color: #CCCCCC}
.r{background-color: #60D080;text-align:right}
.t{background-color: #D09080;width:45%}
img{border:0}
</style>
I tried linking another page in the same directory to it with the link tag.
<link rel="stylesheet" href="index.htm" />
The classes .c and .g worked fine when the page needed to use them. But when I made a <div> tag, it was not centered like it was on the main page. Why could this be? If it's related, I'm using an XHTML 1.0 Strict doctype.
EDIT: The W3C CSS validator doesn't like it, so maybe it was just another IE trick that was too good to be true.