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



Reply
CSS Wrapper not working correctly
Old 02-28-2009, 05:42 PM CSS Wrapper not working correctly
Novice Talker

Posts: 11
Trades: 0
I have a basic website but I'm having a problem with my wrapper. It wont go to the edge of the screen, its like a few pixels off each side. To better explain my problem


As you can see the pink line is my wrapper, but it is off from the left edge and the top edge for some reason, and I cant get anything else lined up correctly because of this.

Any ideas?

My wrapper tag has height:100%
width:100%

Theres nothing out of the ordinary for anything else, just your regular stylesheet.

Last edited by daniel101; 02-28-2009 at 05:44 PM..
daniel101 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-28-2009, 05:56 PM Re: CSS Wrapper not working correctly
Junior Talker

Posts: 3
Name: Marvin
Trades: 0
its kinda hard to say without seeing your code.
Mar-S is offline
Reply With Quote
View Public Profile
 
Old 02-28-2009, 06:36 PM Re: CSS Wrapper not working correctly
Defies a Status

Posts: 1,606
Trades: 0
Can't tell a lot from that image but it looks like a 10PX padding call for the wrapper to me.
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Old 02-28-2009, 08:42 PM Re: CSS Wrapper not working correctly
Novice Talker

Posts: 11
Trades: 0
alrighty here goes

This is my first real attempt at coding something 100% on my own so please dont laugh :P

Code:
@charset "utf-8";
/* CSS Document */


body
{
    background-image:url(images/headerwhole.jpg);
    background-repeat:repeat-x;
    font-size:12px;
}

a:link, a:visited {
    color: #2388c7; 
    text-decoration: none;
    font-weight: normal;
}

a:hover {
    color: #2388c7;    
    text-decoration: underline;
    font-weight: normal;
}

p {
  margin-top: 0;
  margin-bottom: 5px;
  text-align: left;
}

div, p,  table, td, th {
    font-family: Lucida Grande, Verdana,Helvetica,Arial,sans-serif;
    color: #333;    
}

h1 {
    font:"Arial Black", Gadget, sans-serif;
    font-size:22px;
    color:#333333;
}

h2 {
    font:Verdana, Geneva, sans-serif;
    font-size:16px;
    color:#333;
}

.table
{line-height:150%;
font-size:14px;
}

#wrapper
{
    width:100%;
    height:100%;
}

#container
{
    width:1024px;
    margin-left:auto;
    margin-right:auto;
    height:100%;
min-height:100%; 
}

#header
{
    width:1024px;
    height:142px;
    float:left;
    margin:0px;
    padding:0px;
    position:absolute;
    top: 0px;
}
#logo
{
    float:left;
    background-image:url(images/logo.png);
    background-repeat:no-repeat;
    width:251px;
    height:52px;
    margin-top:20px;
}


#nav
{
    
    width:auto;
    margin-top:115px;

}

.spacer
{
    padding-left:20px;
    padding-right:20px;
}

#main
{
width:1024px;
height:auto;
padding-top: 141px;
margin:auto;
}

#left
{
    width:700px;
    float:left;
}

#right
{
    width:291px;
    float:right;
}

#righttext
{
width:275px;
margin-left:auto;
margin-right:auto;
}

#footer
{
    
height:36px;
background-image:url(images/footer.png);
background-repeat:repeat-x;
clear:both;

}

Last edited by daniel101; 02-28-2009 at 08:45 PM..
daniel101 is offline
Reply With Quote
View Public Profile
 
Old 02-28-2009, 09:10 PM Re: CSS Wrapper not working correctly
Defies a Status

Posts: 1,606
Trades: 0
I see css files that use wrapper or header-wrapper. I see them that use container.

Either wrapper or container is the "norm" for containing all the page content. For what I can see of your page above one or the other would be correct but not both.

This page uses a wrapper and a container to create the wide spead at the top while containing the body within a set size.

How you call your CSS within your page deterines what the page will look like when it renders.
__________________
Colbyt

Please login or register to view this content. Registration is FREE
colbyt is offline
Reply With Quote
View Public Profile
 
Old 03-01-2009, 01:04 PM Re: CSS Wrapper not working correctly
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
You need to zero out the margins and padding of your structural elements in the very beginning. Just define margin: 0, padding: 0 for everything.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

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


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

LadynRed is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to CSS Wrapper not working correctly
 

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.84428 seconds with 12 queries