+ Reply to Thread
Results 1 to 10 of 10

Thread: html/css background issue

  1. #1
    garrensilverwing's Avatar
    garrensilverwing is offline x10 Sophmore garrensilverwing is an unknown quantity at this point
    Join Date
    Nov 2008
    Posts
    148

    html/css background issue

    Hi again guys! It has been awhile since I have had an issue with html/css because it is pretty straight forward but I am having trouble figuring this problem out:

    I am designing a profile page for members who join my website and I got it to look just how I want it with one major problem. I want to set the background of the wrapper div so that it is white and will be visible when it is laid against the checkerboard background of my site but the wrapping div is not stretching to fit everything that is inside of it in the code! It works fine in IE 6, IE 7 but every other browser that I test in (firefox, safari, IE it just has a small strip of white at the top (from the padding I am assuming).

    Here is a picture:

    Here is the Code (don't mind the blank lines I have that there so I can easily insert new code with php):
    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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <link rel="stylesheet" type="text/css" href="../../styles.css" />
    <style type="text/css">
    #MainInfoWrapper{
        background: #FFF; 
        position: relative;
        width: 964px;
        margin-top: 15px;
        margin-bottom: 15px;
        margin-right: auto;
        margin-left: auto;
        text-align: left;
        padding: 15px;
    }
    #UserPictureWrapper{
        position: relative;
        float: left;
        height: 150px;
        width: 150px;
        margin-right: 15px;
    }
    #UserInfo{
        position: relative;
        float: left;
        padding: 15px;
        width: 379px;
        height: 120px;
    }
    #Filler {
        position: relative;
        height: 120px;
        padding: 15px;
        width: 358px;
        float: right;
        border: 1px #ccc solid;
    }
    #ExtraInfo {
        position: relative;
        float: left;
    }
    .InfoDivs {
        position: relative;
        width: 939px;
        margin: 15px;
        font-style: italic;
        font-size: small;
    }
    .Contents{
        border: 1px #CCC solid;
        position: relative;
        width: 924px;
        min-height: 15px;
        padding: 5px;
        font-style: normal;
        font-size: medium;
    }
    .UserName {
        color: #354E6D;
        font-size: x-large;
        font-weight: bold;
    }
    .Statistics {
        font-style: italic;
    }
    </style>
    <title>Username's Profile</title>
    </head>
    
    <body>
    <div id="MainInfoWrapper">
        <div id="UserPictureWrapper">
            <img src="../images/default.jpg" />
        </div>
        <div id="UserInfo">
            <p class="UserName">
                Username
                <em style="font-size: medium;">(500)</em>
            </p>
            <p class="Statistics">
                Male,
                100 years old,
                Member
            </p>
        </div>
        <div id="Filler">
        
        </div>
        <div id="ExtraInfo">
            <hr style="color: #354E6D;" />
            <div id="Favorites" class="InfoDivs">
                My Favorites
                <div id="FavoritesContents" class="Contents">
                    Favorite Opening as White:
                    
                    Favorite Opening as Black:
                    
                    Favorite Piece:
                    
                </div>
            </div>
            <div id="AboutMe" class="InfoDivs">
                About Me
                <div id="AboutMeContents" class="Contents">
                
                </div>
            </div>
            <div id="ChessCareer" class="InfoDivs">
                Chess Career
                <div id="ChessCareerContents" class="Contents">
                
                </div>
            </div>
            <div id="BestGame" class="InfoDivs">
                My Best Game
                <div id="BestGameContents" class="Contents">
                
                </div>
            </div>
            <div id="HomePage" class="InfoDivs">
                Homepage
                <div id="HomepageContents" class="Contents">
                
                </div>
            </div>
            <center>
            <em>
                <a href="../reportprofile.php">Report This Profile</a>
                <a href="../editprofile.php">Edit Your Profile</a>
            </em>
            </center>
        </div>
    </div>
    </body>
    </html>

  2. #2
    ichwar's Avatar
    ichwar is offline Community Advocate ichwar is an unknown quantity at this point
    Join Date
    Dec 2008
    Location
    NC, USA
    Posts
    1,454

    Re: html/css background issue

    Can you let me see a screenshot of it in IE?

  3. #3
    garrensilverwing's Avatar
    garrensilverwing is offline x10 Sophmore garrensilverwing is an unknown quantity at this point
    Join Date
    Nov 2008
    Posts
    148

    Re: html/css background issue

    This is it in IE7 and 6 (they look the same pretty much)

  4. #4
    ichwar's Avatar
    ichwar is offline Community Advocate ichwar is an unknown quantity at this point
    Join Date
    Dec 2008
    Location
    NC, USA
    Posts
    1,454

    Re: html/css background issue

    try adding height: 100%; to your main wrapper.

  5. #5
    garrensilverwing's Avatar
    garrensilverwing is offline x10 Sophmore garrensilverwing is an unknown quantity at this point
    Join Date
    Nov 2008
    Posts
    148

    Re: html/css background issue

    Quote Originally Posted by ichwar View Post
    try adding height: 100%; to your main wrapper.
    i tried that it didnt help, on all my other pages i can just leave the height attribute blank and it will automatically stretch to fit everything that is supposed to be inside of it...
    Last edited by garrensilverwing; 09-21-2009 at 01:13 PM.

  6. #6
    ichwar's Avatar
    ichwar is offline Community Advocate ichwar is an unknown quantity at this point
    Join Date
    Dec 2008
    Location
    NC, USA
    Posts
    1,454

    Re: html/css background issue

    Do you mind linking to your sight so I can see it full?

  7. #7
    garrensilverwing's Avatar
    garrensilverwing is offline x10 Sophmore garrensilverwing is an unknown quantity at this point
    Join Date
    Nov 2008
    Posts
    148

    Re: html/css background issue

    unfortunately i am just running it through a localhost server, i think i figured it out though, i added overflow: hidden; to the wrapper and now it seems to be working

  8. #8
    ichwar's Avatar
    ichwar is offline Community Advocate ichwar is an unknown quantity at this point
    Join Date
    Dec 2008
    Location
    NC, USA
    Posts
    1,454

    Re: html/css background issue

    Ok, sounds good.

  9. #9
    garrensilverwing's Avatar
    garrensilverwing is offline x10 Sophmore garrensilverwing is an unknown quantity at this point
    Join Date
    Nov 2008
    Posts
    148

    Re: html/css background issue

    ok thanks for trying to help anyway :D

  10. #10
    kbjradmin's Avatar
    kbjradmin is offline x10 Elder kbjradmin is an unknown quantity at this point
    Join Date
    Feb 2008
    Location
    Washington State, USA
    Posts
    512

    Re: html/css background issue

    i don't see that you've cleared your floats...

+ Reply to Thread

Similar Threads

  1. HTML/CSS issue
    By AttackBunnyPro in forum Programming Help
    Replies: 7
    Last Post: 02-28-2009, 07:42 AM
  2. integration issue between support, cpanel, forum ????
    By holeepassion in forum Free Hosting
    Replies: 4
    Last Post: 12-14-2008, 09:50 PM
  3. Replies: 1
    Last Post: 05-31-2008, 09:23 PM
  4. can anyone convert a CSS into an IPB skin for me?
    By leafypiggy in forum Programming Help
    Replies: 0
    Last Post: 05-06-2008, 07:41 PM
  5. html/css help
    By swantonbomb88 in forum Programming Help
    Replies: 3
    Last Post: 05-01-2008, 09:12 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
x10hosting free hosting for the masses
dedicated servers