views:

79

answers:

1

What am I doing wrong in this HTML code:

    <html>
    <head>
    </head>
    <body>
    <div style="position: absolute; left: 50px; top: 100px; width: 1px; height: 1px; color: red;"></div> 
   </body>
   </html>

I was given it here about an hour ago, but it doesn't work - I don't see a red pixel in my "MS FrontPage" editor

+4  A: 

You need to use background-color: red instead of color: red. Voila... a red pixel!

Daniel Vassallo
clearly my brain isn't awake yet. I spent 5 min looking at that code and couldn't work it out.
Alastair Pitts
thanks, Daniel, it works now!!!!
brilliant