Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: help with a layout background code

  1. #1
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default help with a layout background code

    how do you make a background pic repeat down only? and not all directions thanks

  2. #2
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Code:
    <style type="text/css">
     BODY {
      background: url('bg.png') repeat-x;
     }
    </style>
    Hope this helps.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  3. #3
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Default down?

    Down as in vertically?

    I thought repeat-y was vertical whereas repeat-x was horizontal?
    Code:
    <style type="text/css">
     BODY {
      background: url('bg.png') repeat-y;
     }
    </style>
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  4. #4
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default

    neither worked :/ here is the site link www.dynamic.modernrevolutions.net

  5. #5
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    change:

    Code:
    background-image:url(http://i302.photobucket.com/albums/nn86/kendruh326/dynamicpart2.png)repeat-y;
    to:

    Code:
    background:url(http://i302.photobucket.com/albums/nn86/kendruh326/dynamicpart2.png)repeat-y;
    I thought repeat-y was vertical whereas repeat-x was horizontal?
    You're right, I just got them confused (which I always seem to do).
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

  6. #6
    Join Date
    Aug 2006
    Posts
    235
    Thanks
    30
    Thanked 2 Times in 2 Posts

    Default

    thanks SO MUCH!!! now i have 1 qestion. why is the page so wide? like it goes forever...?

  7. #7
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Smile Why so wide...

    You're defining your width to the "Content" div as 250% see below:

    Code:
    .content {
    background:#FFFFFF none repeat scroll 0% 0%;
    color:#FFFFFF;
    float:left;
    font-family:arial;
    font-size:10px;
    font-weight:normal;
    line-height:13px;
    padding:0px;
    text-align:left;
    text-transform:none;
    width:250%;
    }
    Change it to 100%, also... A good rule of thumb would be to change "scroll" to "auto". So all together would be:

    Code:
    .content {
    background:#FFFFFF none repeat auto 0% 0%;
    color:#FFFFFF;
    float:left;
    font-family:arial;
    font-size:10px;
    font-weight:normal;
    line-height:13px;
    padding:0px;
    text-align:left;
    text-transform:none;
    width:100%;
    }

    Hope this helps!
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  8. #8
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Thumbs up Also...

    Just noticed that with that fix you have some of the original white background showing through... So to fix that change this:

    Code:
    .content {
    background:#FFFFFF none repeat scroll 0% 0%;
    color:#FFFFFF;
    float:left;
    font-family:arial;
    font-size:10px;
    font-weight:normal;
    line-height:13px;
    padding:0px;
    text-align:left;
    text-transform:none;
    width:250%;
    }
    Just change that to #3d3d3d as you have the original background color set to. So the entire fixed code would be:

    Code:
    .content {
    background:#3D3D3D none repeat auto 0% 0%;
    color:#FFFFFF;
    float:left;
    font-family:arial;
    font-size:10px;
    font-weight:normal;
    line-height:13px;
    padding:0px;
    text-align:left;
    text-transform:none;
    width:100%;
    }
    Last edited by TheJoshMan; 07-20-2008 at 04:44 AM. Reason: forgot to change "scroll" to "auto"
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  9. #9
    Join Date
    Jan 2006
    Location
    Ft. Smith, AR
    Posts
    795
    Thanks
    57
    Thanked 129 Times in 116 Posts

    Question Wondering

    Shouldn't this post technically be under "CSS"?
    --------------------------------------------------
    Reviews, Interviews, Tutorials, and STUFF
    --------------------------------------------------
    Home of the SexyBookmarks WordPress plugin

  10. #10
    Join Date
    Sep 2006
    Location
    St. George, UT
    Posts
    2,769
    Thanks
    3
    Thanked 157 Times in 155 Posts

    Default

    Quote Originally Posted by Nyne Lyvez View Post
    Shouldn't this post technically be under "CSS"?
    You are correct, moved thread. I swear, it's been on of those days today.
    "Computer games don't affect kids; I mean if Pac-Man affected us as kids, we'd all be running around in darkened rooms, munching magic pills and listening to repetitive electronic music." - Kristian Wilson, Nintendo, Inc, 1989
    TheUnlimitedHost | The Testing Site | Southern Utah Web Hosting and Design

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •