Jump to content

New Layout Confusion


Xtremer360

Recommended Posts

  • 1 month later...

well since im still learing how to set up difrent types of layouts i have made a start to your request.

 

 

css

#container {
right-margin:auto;
left-margin:auto;
width:1000px;
}

#header {
background:#999;
}

#navbar {
background:#C6C;
}

#content1 {
background:#90F;
float:left;
}

#content2 {
background:#FF0;
}

#sidebar {
background:#3C3;
float:right;
}

#footer {
clear:both;
background:#33F;
}

 

HTML

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="styles.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<div id="container">
<div id="header" class=>HEADER</div>
    <div id="navbar">NAVBAR</div>
    <div id="content1">CONTENT1</div>
    <div id="content2">CONTENT2</div>
    <div id="sidebar">SIDEBAR</div>
    <div id="footer">FOOTER</div>
</div>




</body>
</html>

 

I will keep working at it to see if i can fix content 1 and 2.

 

 

 

Link to comment
https://forums.phpfreaks.com/topic/175530-new-layout-confusion/#findComment-945303
Share on other sites

ok I have done it.. Not sure if this is the right way to do it but it works.. can some one please comment on the way I have layed it out.

 

 

Thank you

 

 

CSS CODE

 

#container {
right-margin:auto;
left-margin:auto;
width:1000px;
}

#header {
background:#999;
}

#navbar {
background:#C6C;
}

#contentContanier {
float:left;
width:800px;
}

#content1 {
background:#90F;
height:300px;
}

#content2 {
background:#FF0;
height:300px;
}

#sidebar {
background:#3C3;
float:right;
width:200px;
height:600px;
}

#footer {
clear:both;
background:#33F;
}

 

 

HTML CODE

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<link rel="stylesheet" type="text/css" href="styles.css" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
</head>

<body>
<div id="container">
<div id="header">HEADER</div>
    <div id="navbar">NAVBAR</div>
    
<div id="contentContanier">
    <div id="content1">CONTENT1</div>
    <div id="content2">CONTENT2</div>
</div>    
    
    <div id="sidebar">SIDEBAR</div>
    <div id="footer">FOOTER</div>
</div>




</body>
</html>

 

just change the widths and height to what you want. :)

Link to comment
https://forums.phpfreaks.com/topic/175530-new-layout-confusion/#findComment-945891
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.