Top and Left property not working! Why?

Posted by MonuMan5 on Stack Overflow See other posts from Stack Overflow or by MonuMan5
Published on 2011-06-26T23:44:31Z Indexed on 2011/06/27 0:22 UTC
Read the original article Hit count: 155

Filed under:
|

I recently took up learning some css... and I am getting stuck on some very basic hurdles.

I can't get the top and left properties to work on this basic page that I was creating.

Below is all the code for that page... all the properties work except the top and left.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html>
<head>
    <style type="text/css">
        #firstdiv {border: 2px solid red;
                    position: absolute;
                    top:15px; 
                    left:25px:}
                #seconddiv {border: 2px solid green;
                    position: absolute;
                    top:65px; 
                    left:5px:}
    </style>
</head>
<body>
<div id="firstdiv">This is my first div </div>
<div id="seconddiv">This is my second div</div>
</body>
</html>

Any help on this issue would be greatly appreciated! = D

© Stack Overflow or respective owner

Related posts about css

Related posts about XHTML