Results 1 to 3 of 3

Thread: backgrounds in divs in ff

  1. #1
    Join Date
    May 2006
    Location
    New York City
    Posts
    77
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default backgrounds in divs in ff

    I've noticed that when I apply a background to a div in ie like this:

    HTML Code:
    div.main_id {
         background: #ffffff url(images/background_image.jpg) bottom right fixed no-repeat;
         border: #880000 outset 5px;
         width: 600px;
         height: 400px;
    }
    it renders the right edge of the image against the right edge of the div, but in firefox, it looks like it renders the right edge of the image against the right edge of the screen but only displays the part that is inside the div . . . in other words, the background doesn't line up with the div, and I only see part of the image. Is there a way to make this work in both browsers? Thanks.

  2. #2
    Join Date
    Apr 2006
    Posts
    190
    Thanks
    3
    Thanked 7 Times in 7 Posts

    Default

    Do you have an example that we can see?
    Ryan
    Sevierville, TN

  3. #3
    Join Date
    Feb 2007
    Posts
    293
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Take out the word "fixed" so your code would be

    Code:
    <style>
    #main_id {
         background: #696969 url(images/background_image.jpg) bottom right no-repeat;
         border: #880000 outset 5px;
         width: 600px;
         height: 400px;
    }
    </style>

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
  •