Results 1 to 4 of 4

Thread: Problem positioning tiling background image

  1. #1
    Join Date
    May 2008
    Posts
    12
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default Problem positioning tiling background image

    I am fairly new to CSS and trying to break out of my old table habits for positioning. This may be a simple problem with a simple solution. I think it may involve floats, or absolute positioning, or something like that, but I'm looking for something that will do the trick.

    Here's the page in question.

    I want the background tiling image to match up with the stripe in the banner. Right now on my PC, it is looking ok in IE, but FF and Safari are "off" a bit. The stripe in the tiling background image is a tad low relative to the stripe in the main image (banner). I think it has to do with how the banner image is positioned by default in each of the browsers.

    Help? Anyone? Any input is much appreciated. THANKS!

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    The problem has to do with the default margins for the body element which vary in various browsers. Try adding these styles:

    Code:
    body {
    	background-color: #4F1E0C;
    	background-image: url(images/background_squares.gif);
    	background-repeat: repeat-x;
    	background-position:top;
    	margin: 15px 10px;
    	padding: 0;
    }
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. The Following User Says Thank You to jscheuer1 For This Useful Post:

    springtime (09-18-2008)

  4. #3
    Join Date
    Sep 2008
    Location
    Whiteford, MD
    Posts
    39
    Thanks
    1
    Thanked 2 Times in 2 Posts

    Default

    Or he can do * { margin:0; padding:0;}

    But you might have to mess with the margins and paddings throughout the page.

  5. The Following User Says Thank You to SpOrTsDuDe-Reese For This Useful Post:

    springtime (09-18-2008)

  6. #4
    Join Date
    May 2008
    Posts
    12
    Thanks
    8
    Thanked 0 Times in 0 Posts

    Default

    Thank you both. I tried both solutions and they both actually were great Much appreciated.

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
  •