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
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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.