Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 5 of 5
  1. #1
    Member
    Join Date
    Aug 2011
    Posts
    64
    Member #
    28942
    Liked
    8 times
    It's been a while since I've touched web design and I was just learning CSS last time I was doing it.
    I'm starting a simple page for my brothers new business, and Just with my background/simple layout, I'm already having an issue.

    I have a colored background, and a container div with white background centered.
    When I type within this container, text appears over the white background.
    As soon as I create another div and place text within that, within the container, it pushes the white down and the text is over the colored background. The container is there, the border still shows, but the white background color doesn't behind the line of text.
    I don't get what's happening and it's really irritating me!

    Code:
    <link href="css/layout.css" rel="stylesheet" type="text/css" />
    </head>
    
    <body>
    <div id="container">
        <div id="pageheader"><span id="header">Lee's Outback Grooming</span></div>
    fghdfghdfg
    
    </div>
    
    </div>
    </body>
    
    (css file)
    * {
        margin: 0px;
        padding: 0px;
        background-color: #805252;
        background-image: url(../images/bg.jpg);
        background-repeat: repeat-x;
    }
    #container {
        width: 800px;
        position: relative;
        left: auto;
        right: auto;
        background-color: #FFF;
        background-image: none;
        top: 0px;
        margin-top: 0px;
        margin-right: auto;
        margin-bottom: 0px;
        margin-left: auto;
        padding: 0px;
        height: 1000px;
        text-align: center;
        float: none;
        border-right-width: 1px;
        border-left-width: 1px;
        border-right-style: solid;
        border-left-style: solid;
        border-right-color: #000;
        border-left-color: #000;
    }

  2.  

  3. #2
    Senior Member Webzarus's Avatar
    Join Date
    May 2011
    Location
    South Carolina Coast
    Posts
    3,322
    Member #
    27709
    Liked
    770 times
    Not seeing any definition to the page header div that you are calling in the CSS you posted. ?

  4. #3
    Member
    Join Date
    Aug 2011
    Posts
    64
    Member #
    28942
    Liked
    8 times
    Well I don't have any yet. I am kind of copying my previous project, and I'm not done making my header image yet. The idea is to make the span header hidden, then pageheader bg image with the logo/header image.
    But just from typing within the div, the background where content is placed is not white. I will be putting text in the container with intro/description etc. I have only just started this project.
    My previous project does not have this issue, but I'm not sure what the difference is...

  5. #4
    Member
    Join Date
    Aug 2011
    Posts
    64
    Member #
    28942
    Liked
    8 times
    Okay, I figured it out!!!
    I was defining the background in the css with * instead of body. Just changing the name of that to body fixed the problem!!! (was following a tutorial where they did * for margins, but they did body css within the page rather than external css)

  6. #5
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Good to know you figured it out, and thanks for sharing the solution!
    Think about posting the finished site for review when you're done.
    Alamalloy likes this.
    Good design should never say "Look at me!"
    It should say "Look at this." ~ David Craib


    http://digitalinsite.ca ~ my current site . . info@digitalinsite.ca ~ my email

    If you feel that someone's post helped you fix your problem, answered your question, or just made you feel better, feel free to "Like" their post. The "Like" link is at the bottom right of each post, along side the "reply" link. And if you are being helped here, try to help someone else - pass it on!


Remove Ads

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
All times are GMT -6. The time now is 02:16 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com