Results 1 to 4 of 4

Thread: CSS float disappeared the background

  1. #1
    Join Date
    Jun 2009
    Posts
    1,112

    CSS float disappeared the background

    I do a redesign of a website using only css and no lists. The problem is I have div box floated just left to be alongside other but when I do the background grand parent which is disappearing in the light of the container sections in Firefox and Opera. But when i tried it in IE 6, it shows the fine.

    Any one could suggest me in this ? Please.

  2. #2
    Join Date
    Oct 2005
    Posts
    2,393

    Re: CSS float disappeared the background

    The background-attachment property must be set to "fixed" to work in Firefox and opera. Or use this:-

    <html>
    <head>
    <style type="text/css">
    body
    {
    background-image:url('smiley.gif');
    background-repeat:no-repeat;
    background-attachment:fixed;
    background-position:center;
    }
    </style>
    </head>

    <body>
    <p><b>Note:</b> For this to work in Firefox and Opera, the background-attachment property must be set to "fixed".</p>
    </body>
    </html>

  3. #3
    Join Date
    May 2008
    Posts
    2,389

    Re: CSS float disappeared the background

    Go to the bottom of your page and add this:-

    </p></div></div>
    <div id="clear"></div>
    </div>

    <div id="bottom">Content for id "bottom" Goes Here</div></body></html>
    And this code to your CSS:

    #clear {clear: both; margin: 0px}

  4. #4
    Join Date
    Jun 2009
    Posts
    1,112

    Re: CSS float disappeared the background

    Thanks a lot buddy for the quick help. I'll try this method and make sure the background-attachment property is set to fixed. Hope it works. I'll be back if any problem occurs.

    Thank you. I appreciate your help.

Similar Threads

  1. Casting int to float in C
    By Jensen Ackles in forum Software Development
    Replies: 4
    Last Post: 05-04-2010, 05:08 PM
  2. Float vs Double variable
    By Samarth in forum Software Development
    Replies: 5
    Last Post: 19-12-2009, 01:03 PM
  3. How to convert string to float c#
    By Pratyush in forum Software Development
    Replies: 3
    Last Post: 14-08-2009, 01:09 PM
  4. CSS : How to float outside parent div
    By Valerian in forum Software Development
    Replies: 4
    Last Post: 21-05-2009, 12:03 PM
  5. How to make a CSS div float OVER another div
    By Warner in forum Software Development
    Replies: 3
    Last Post: 21-05-2009, 10:50 AM

Tags for this Thread

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
  •  
Page generated in 1,750,317,746.99469 seconds with 16 queries