View Full Version : whats wrong with my code?


sarahstrange
01-02-2007, 12:28 AM
whats wrong with my code? when i look at the page nothing shows up?
<html>
<head>
<style type="text/css">

A:link
{ text-decoration: blink; color:#000000; }
A:visited
{ text-decoration: line-through; color:#000000; }
A:active
{ text-decoration: line-through; color:#000000; }
A:hover
{ text-decoration: line-through; color:#000000;


body
{ background: #000000;
background-image: url('http://woeisme.bravehost.com/bg1.jpg');
background-repeat: repeat;
background-position: top left;

background-attachment: fixed;

font-family: wizard;
color: #000000 ;
letter-spacing: 10pt;
font-weight: lighter;
font-size: 16pt;


scrollbar-face-color : #000000;
scrollbar-highlight-color : #000000;
scrollbar-3dlight-color : #000000;
scrollbar-shadow-color : #000000;
scrollbar-darkshadow-color : #000000;
scrollbar-track-color : #663300;
scrollbar-arrow-color : #663300;
</style>
<div style="position:absolute; left:100px; top:100px; width:100px; height:100px; background-color:#ffffff; overflow:auto; scrollbar-face-color : #000000; scrollbar-highlight-color : #000000; scrollbar-3dlight-color : #000000; scrollbar-shadow-color : #000000; scrollbar-darkshadow-color : #000000; scrollbar-track-color : #663300; scrollbar-arrow-color : #663300;">

Content here

</div>

<div style="position:absolute; left:500px; top:100px; width:300px; height:100px; background-color:#ffffff; overflow:auto; scrollbar-face-color : #000000; scrollbar-highlight-color : #000000; scrollbar-3dlight-color : #000000; scrollbar-shadow-color : #000000; scrollbar-darkshadow-color : #000000; scrollbar-track-color : #663300; scrollbar-arrow-color : #663300;">

Content here

</div>
<title>woe is me</title>
</head>
<body style="margin:0;">
</body>
</html>

newbi
01-02-2007, 06:49 AM
That's because you essentially have no content - as you put your content in the head section of your html, the contents of which are never visible in the browser window (save for the title).

Try cutting everything after </style> and before <title> - i.e. your two divs - and pasting them just before the closing </body> tag. That should enable you to actually see them.

Furthermore, you might also want to consider creating names or ids for your divs and moving their style properties up in the head section - and then perhaps even removing all the CSS into a separate file. Gives you cleaner code that way.

Hope that helps.