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
    Senior Member Tyler Smith's Avatar
    Join Date
    Oct 2011
    Posts
    115
    Member #
    29767
    Liked
    7 times
    Hello all,

    And here's a rather novice question from yours truly:

    Why is this background not sitting in the top-left corner?

    Code:
    @charset "utf-8";
    /* Cash Gifting Home Page CSS Stylesheet */
    *{
     background:url("cashgiftingbg.jpg") no-repeat scroll 0% transparent;
     height:1200px;
     width:735px;
     margin:0 auto;
    }
    #container{
     background:#FFF;
     width:600px;
     height:auto;
     margin:0 auto;
    }
    h1{
     height:65px;
     width:570px;
     position:relative;
     padding:0;
     margin:0;
     text-align:center;
    }
    /* mac hide */
    h1{overflow:hidden;}
    /* end hide */
    h1 span{
     background:url("howtogetrichfastcashgifting.gif");
     position:absolute;
     left:0;
     top:0;
     display:block;
     height:80px;
     width:670px;
    }
    Markup so far:
    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" />
        <meta http-equiv="Content-Language" content="en" />
        <meta name="Description" content="Interested in a secondary, tax-free income source? Read here for information on how to successfully start a cash gifting business." />
        <meta name="Keywords" content="keyword1, keyword2" />
        <link href="style/main.css" rel="stylesheet" type="text/css" media="screen,projection,tv" />
     <title>Earn Money with Cash Gifting- Get Rich by Starting a Cash Gifting Business</title>
    </head>
    <body>
     <div id="container">
      <h1>HowToGetRichFast.com<span></span></h1>
        </div>
    </body>
    </html>
    Thanks!

  2.  

  3. #2
    Eis
    Eis is offline
    Junior Member Eis's Avatar
    Join Date
    Feb 2012
    Posts
    12
    Member #
    30892
    Liked
    2 times
    No need to worry about being a noob, I'm one as well.
    Did you try left top instead of 0% ? It probably makes no difference... but whatever. xD

    Where is it sitting? I can't copy the code right now to look.

  4. #3
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    it should probably be body instead of *, and the position of the image must be specified:

    body {
    background:url("cashgiftingbg.jpg") no-repeat left top;
    height:1200px;
    width:735px;
    margin:0 auto;
    }


    m3n0tu18, Eis and Tyler Smith like 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!

  5. #4
    Senior Member Tyler Smith's Avatar
    Join Date
    Oct 2011
    Posts
    115
    Member #
    29767
    Liked
    7 times
    Yes, that put it up in its correct location. I'm puzzled as to why targeting the body is the fix, but I guess it won't matter if I know the theory behind it.

    Thank you for both of your contributions.

  6. #5
    WDF Staff AlphaMare's Avatar
    Join Date
    Oct 2009
    Location
    Montreal, Canada
    Posts
    4,570
    Member #
    20277
    Liked
    878 times
    Quote Originally Posted by Tyler Smith, post: 233124
    Yes, that put it up in its correct location. I'm puzzled as to why targeting the body is the fix, but I guess it won't matter if I know the theory behind it.

    Thank you for both of your contributions.
    Targeting the body makes the image visible in a specific tag - the body of the document.

    If you use * , which is a wildcard symbol, it means that the image could be available to any element at all, which could result in it appearing more than once, in places where you don't want it.
    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 10:01 AM.
Powered by vBulletin® Version 4.2.3
Copyright © 2021 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com