I am trying to make a very simple table using css but it is not turning out the way I like it to be.
Here are the HTML and CSS code I use:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>Insert title here</title> <link rel="stylesheet" type="text/css" href="style.css"> </head> <body> <div id="posttable"> <div class="individualpost"> <div class="title"> This is the title </div> <div class="userinfo"> This is the user info section </div> <div class="postbody"> This is the post body </div> </div> </div> </body> </html>
and
@CHARSET "UTF-8";
#posttable{
width:100%;
border-style:solid;
border-width:1px;
border-color:#999999;
background-color:green;
z-index:-1;
}
.individualpost{
width:100%;
border-style:solid;
border-width:1px;
border-color:#999999;
margin:3px;
background-color:red;
}
.title{
width:100%;
border-style:solid;
border-width:1px;
border-color:#999999;
}
.userinfo{
position:relative;
width:30%;
float:left;
}
.postbody{
position:relative;
width:70%;
float:right;
}
I would like to have a table devided into 3 sections. A section at top which contains the title of the table. Anything below the title will be devided in 2. The part on the left will have userinfo, and the part on the right will have post body.
Can anyone tell me what is wrong with my code.
Thanks

New Topic/Question
Reply



MultiQuote




|