Click to See Complete Forum and Search --> : Why can't i see the div with background-color?


web-coder
10-06-2009, 11:02 PM
Can't understand where is the error.

<html>
<head title="Javascript Testing">
<style type="text/css">
div.div1{
position=absolute;
top=80px;
left=120px;
width=200px;
height=40px;
}
</style>
</head>
<body>
Hello world
<div class="div1">
</div>
</body>
</html>

web-coder
10-06-2009, 11:03 PM
<html>
<head title="Javascript Testing">
<style type="text/css">
div.div1{
position=absolute;
top=80px;
left=120px;
width=200px;
height=40px;
background-color:green;

}
</style>
</head>
<body>
Hello world
<div class="div1">
</div>
</body>
</html>

web-coder
10-06-2009, 11:32 PM
Solved.

<html>
<head title="Javascript Testing">
<style type="text/css">
div.div1{
position:absolute;
top:80px;
left:120px;
width:200px;
height:40px;
background-color:green;

}
</style>
</head>
<body>
Hello world
<div class="div1">
</div>
</body>
</html>

thanhvnn1
10-07-2009, 09:52 AM
Hi dude...
i wonder you learn these code from where or who ???
<head title="Javascript Testing">
it's would be this
<head> <title>Javascript Testing</title> <style>.......</style> </head>

wdfrq
10-07-2009, 10:36 AM
please never try to fake post.


------------------------------
Easy Web Development Tutorial (http://sumotuto.com/html_intro.php)

FrankTheTank
10-07-2009, 02:20 PM
web-coder, you might wish to start with the HTML and CSS basics.

http://www.w3schools.com/html/
http://www.w3schools.com/css/

I know it's tempting to just dive in and code some stuff and see what happens, but it's faster than you might think and you'll get a lot further if you get off to a solid start with some resources like these.

Frank