Go Back   TechArena Community > Software > Software Development
Become a Member!
Forgot your username/password?
Tags Active Topics RSS Search Mark Forums Read

Reply
 
Thread Tools Search this Thread
  #1  
Old 29-06-2009
Member
 
Join Date: Jun 2009
Posts: 1,108
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.
Reply With Quote
  #2  
Old 29-06-2009
Member
 
Join Date: Oct 2005
Posts: 2,389
Re: CSS float disappeared the background

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

Quote:
<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>
Reply With Quote
  #3  
Old 29-06-2009
Member
 
Join Date: May 2008
Posts: 2,383
Re: CSS float disappeared the background

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

Quote:
</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:

Quote:
#clear {clear: both; margin: 0px}
Reply With Quote
  #4  
Old 29-06-2009
Member
 
Join Date: Jun 2009
Posts: 1,108
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.
Reply With Quote
Reply

  TechArena Community > Software > Software Development
Tags: , , ,



Thread Tools Search this Thread
Search this Thread:

Advanced Search


Similar Threads for: "CSS float disappeared the background"
Thread Thread Starter Forum Replies Last Post
Casting int to float in C Jensen Ackles Software Development 4 05-04-2010 05:08 PM
Float vs Double variable Samarth Software Development 5 19-12-2009 01:03 PM
How to convert string to float c# Pratyush Software Development 3 14-08-2009 01:09 PM
CSS : How to float outside parent div Valerian Software Development 4 21-05-2009 12:03 PM
How to make a CSS div float OVER another div Warner Software Development 3 21-05-2009 10:50 AM


All times are GMT +5.5. The time now is 05:53 AM.