I am just learning to use CSS. My first objective is to apply a stlye to a box of text and graphics. Here's what I've done so far:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<HTML><HEAD>
<TITLE="Test">
<STYLE type="text/css">
.MyItemBox
{ position:absolute; overflow:hidden;
top:1; left:50;
width:493; height:97;
background-color:green; visibility:visible;
border:1px solid black;
}
</STYLE></HEAD>
<BODY>
<DIV ID="FirstItemBox" STYLE="MyItemBox">
<IMG SRC="MyPicture.gif">
<P>My Text Goes Here</P>
</DIV>
</BODY></HTML>
Now the end result is that none of the style properties apply to the DIV element. The item box is not green or positioned correctly. However, if I put all of the style properties inline, instead of in the STYLE section, then it works. So why is it not working this way?
- James.
My memory is not as good as it should be, and neither is my memory.
I have forgotten more than I can remember
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN">
<HTML><HEAD>
<TITLE="Test">
<STYLE type="text/css">
.MyItemBox
{ position:absolute; overflow:hidden;
top:1; left:50;
width:493; height:97;
background-color:green; visibility:visible;
border:1px solid black;
}
</STYLE></HEAD>
<BODY>
<DIV ID="FirstItemBox" STYLE="MyItemBox">
<IMG SRC="MyPicture.gif">
<P>My Text Goes Here</P>
</DIV>
</BODY></HTML>
Now the end result is that none of the style properties apply to the DIV element. The item box is not green or positioned correctly. However, if I put all of the style properties inline, instead of in the STYLE section, then it works. So why is it not working this way?
- James.
My memory is not as good as it should be, and neither is my memory.
I have forgotten more than I can remember