HI, i have only just started html and was wondering why this is not working.
all i want is my div to be inside the table.
Thanks
<html>
<head>
<link rel="stylesheet" href="layout.css" type="text/css"/>
</head>
<body>
<table class="page">
<tr><td>
<div class="header">
<b><br>div box</b>
</div>
<div class="Tmenu">
<b>div box</b>
</div>
<div class="Smenu">
<b>div box</b>
</div>
<div class="footer">
<b>div box</b>
</div>
<div class="textblock">
<b>div box</b>
</div>
</td></tr></table>
</body>
</html>
CSS
div.header
{
position:absolute;
top:20px;
left:20px;
width:900px;
height:100px;
background-color:#eee;
text-align:center;
}
div.Tmenu
{
position:absolute;
top:125px;
left:20px;
width:900px;
height:30px;
background-color:#eee;
text-align:center;
}
div.Smenu
{
position:absolute;
top:160px;
left:20px;
width:200px;
height:500px;
background-color:#eee;
text-align:center;
}
div.footer
{
position:absolute;
top:800px;
left:20px;
width:900px;
height:60px;
background-color:#eee;
text-align:center;
}
div.textblock
{
position:absolute;
top:160px;
left:225px;
width:695px;
height:630px;
background-color:black;
text-align:center;
}
table.page
{
border:1px solid black;
width:900px;
height:1000px;
margin-left:auto;
margin-right:auto;
}
all i want is my div to be inside the table.
Thanks
<html>
<head>
<link rel="stylesheet" href="layout.css" type="text/css"/>
</head>
<body>
<table class="page">
<tr><td>
<div class="header">
<b><br>div box</b>
</div>
<div class="Tmenu">
<b>div box</b>
</div>
<div class="Smenu">
<b>div box</b>
</div>
<div class="footer">
<b>div box</b>
</div>
<div class="textblock">
<b>div box</b>
</div>
</td></tr></table>
</body>
</html>
CSS
div.header
{
position:absolute;
top:20px;
left:20px;
width:900px;
height:100px;
background-color:#eee;
text-align:center;
}
div.Tmenu
{
position:absolute;
top:125px;
left:20px;
width:900px;
height:30px;
background-color:#eee;
text-align:center;
}
div.Smenu
{
position:absolute;
top:160px;
left:20px;
width:200px;
height:500px;
background-color:#eee;
text-align:center;
}
div.footer
{
position:absolute;
top:800px;
left:20px;
width:900px;
height:60px;
background-color:#eee;
text-align:center;
}
div.textblock
{
position:absolute;
top:160px;
left:225px;
width:695px;
height:630px;
background-color:black;
text-align:center;
}
table.page
{
border:1px solid black;
width:900px;
height:1000px;
margin-left:auto;
margin-right:auto;
}