Thread: Main Wrapper

Results 1 to 4 of 4

Hybrid View

  1. #1
    Join Date
    Aug 2006
    Location
    West Virginia
    Posts
    321
    Plugin Contributions
    1

    Default Main Wrapper

    Hello, I want to use an image inside my main wrapper. I have this code in my stylesheet:
    Code:
    #mainWrapper {
    	background-image: url(../images/burn_paper.gif);
    	text-align: left;                                                         
    	width: 90%;                                                                          vertical-align: top;  
    	border: 1px solid #9a9a9a;
    It repeats the image which I dont want... I tried using this code:
    Code:
    #mainWrapper {
    	background-image: url(../images/burn_paper.gif);
    	background-repeat:no-repeat;
    	text-align: left;                                                         
    	width: 90%;                                 
    	vertical-align: top;  
    	border: 1px solid #9a9a9a;
    But it just make my image in one corner. My image is 600x800px. What do I need to do to get it to cover the whole main wrapper? I dont want it as the body background image.. Thanks!

  2. #2
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Main Wrapper

    CSS doesn't stretch an image to fill a cell the way (I think) tables do. The image is what it is. If you want it to fill a div, it needs to be big enough for whatever size the div could be, or else repeat in one or both directions.

    An alternative for images that fade at one edge is to give the div a background-color to match that edge, so there is no visible break.

  3. #3
    Join Date
    Aug 2006
    Location
    West Virginia
    Posts
    321
    Plugin Contributions
    1

    Default Re: Main Wrapper

    Quote Originally Posted by gjh42 View Post
    CSS doesn't stretch an image to fill a cell the way (I think) tables do. The image is what it is. If you want it to fill a div, it needs to be big enough for whatever size the div could be, or else repeat in one or both directions.

    An alternative for images that fade at one edge is to give the div a background-color to match that edge, so there is no visible break.

    TRhe problem with it fading to the next it its a burnt piece of paper with dark edges. Any other sugestions? Could I break the image up and add pieces in each box? Thanks!

  4. #4
    Join Date
    Jul 2005
    Location
    Upstate NY
    Posts
    22,010
    Plugin Contributions
    25

    Default Re: Main Wrapper

    Can you post a link to the site? It's hard to know exactly what you want or what obstacles there are without seeing it.

    If the image is the size you want but off center, that is easy to fix. Add

    background-position: top center; (or center center;)

    to #mainWrapper.

    Cutting it up won't help anything. If other divs are obscuring parts of it, give them

    background-color: transparent;

 

 

Similar Threads

  1. floating main wrapper
    By joe2009uk in forum Templates, Stylesheets, Page Layout
    Replies: 5
    Last Post: 16 May 2010, 08:19 PM
  2. Main Wrapper Border
    By mawson in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 11 May 2010, 01:39 PM
  3. Main Wrapper Background
    By rbonja in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 16 Dec 2008, 05:57 AM
  4. nav main wrapper
    By Cecile in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 7 May 2008, 11:42 AM
  5. Main Page Wrapper?
    By greatbig47 in forum Templates, Stylesheets, Page Layout
    Replies: 3
    Last Post: 5 Oct 2006, 01:12 PM

Posting Permissions

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