Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Closed Thread
.wrapper issue in fixed width layout
Old 11-12-2010, 10:04 AM .wrapper issue in fixed width layout
Novice Talker

Posts: 5
Name: justa guy
Trades: 0
I probably have the cart before the horse, but I am trying to take it step by step, hand-coding in DW to learn the basics first.

I have placed all my html <div>'s within a container, and in an attempt to add color to the white-space surrounding this container, I have made a wrapper.

My intent is to make this area "liquid," filling the white-space regardless of resolution. Unfortunately I have a slim white-space surrounding this wrapper when viewed in a browser.

Simple HTML:

<title>Untitled Document</title>
<link href="website.css" rel="stylesheet" type="text/css" />
</head>

<body>
<div class="wrapper">wrapper
<div class="container">
<div class="header">header</div>
<div class="navigation">navigation</div>
<div class="content">content</div>
<div class="sidebar">sidebar</div> <div class="footer">footer</div>
</div>
</div>
</body>
</html>

Simple CSS:

.body {
}

.wrapper{
background: #9999cc;
width: 100%;

}

.container {
width: 900px;
margin-left: auto;
margin-right: auto;
background-color: #ffffff;
}

.header {
background-color: red;
margin:0 auto;
height:100px;
width: 900px;
}

.navigation {
background-color: yellow;
margin:0 auto;
height: 50px;
width: 900px
}

.content {
background-color: green;
margin: 0 auto;
float: left;
height: 800px;
width: 600px;
}

.sidebar {
background-color: blue;
margin: 0 auto;
float: right;
height: 800px;
width: 300px;
}

.footer {
clear: both;
background-color: gray;
margin :0 auto;
height: 70px;
width: 900px;
}

I haven't gotten to padding, borders or margins yet that was to be my next step. My efforts are solely to begin to get my "feet- wet" by trial/error and learn through making mistakes.
justaguynpc is offline
View Public Profile
 
 
Register now for full access!
Old 11-12-2010, 10:59 AM Re: .wrapper issue in fixed width layout
Lysander's Avatar
Junior Talker

Posts: 4
Trades: 0
simply reset default browsers margin & padding by adding in your css:
body {
margin:0;
padding:0;
}

(without dot before "body")
__________________

Please login or register to view this content. Registration is FREE

Last edited by Lysander; 11-12-2010 at 05:41 PM..
Lysander is offline
View Public Profile Visit Lysander's homepage!
 
Old 11-12-2010, 11:48 AM Re: .wrapper issue in fixed width layout
Novice Talker

Posts: 5
Name: justa guy
Trades: 0
Thanks Lysander for your assistance. That did the trick. I don't know why I was under the impression that the "." is required syntax for styling html elements.
Sorry, I did know that a class selector uses the "." I am easily confused at this point.

I have got soooo much to learn.

Last edited by justaguynpc; 11-12-2010 at 01:37 PM.. Reason: Trying not too look TOO dumb!
justaguynpc is offline
View Public Profile
 
Closed Thread     « Reply to .wrapper issue in fixed width layout
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.15079 seconds with 12 queries