Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Using float makes my background-image disappear
Old 12-09-2009, 04:22 AM Using float makes my background-image disappear
Junior Talker

Posts: 2
Name: Amber
Trades: 0
I'm working on my website and for some reason I can't figure this out. I usually can but I'm stumped right now. Maybe I'm just up too late.

My "content" div has a y-repeated background, and it worked fine up until I put my "col2" and "col3" divs to float left and right. Does the float command just not like working properly in this type of set up, or am I doing something wrong? I'd appreciate some help!

This is what it's looking like right now;
http://ambrelasweb.com/index2.html

HTML Code:
Quote:
<div id="content">


<div id="col1">

<img src="http://www.webmaster-talk.com/images/gallery.jpg" /><br /><br/><br/>
<img src="http://www.webmaster-talk.com/images/titleWELCOME.jpg" />
<p>Looks like your looking for a website. Well you've found me either because you've heard about my work, have my
business card, or stumbled across my page. I, Amber Goodwin, create basic web sites for small businesses, and
individuals who seek professional looking websites for a reasonable cost. Through the science that is web design I can bring your, either old website back to life, or create you a whole new one using my skills as a graphic designer so that your presence on the web matters. I can offer a wide variety </br> of skills to incorporate into your website.</p>
<p>&nbsp;</p>
</div><!--END OF col1-->



<div id="col2">
<img src="http://www.webmaster-talk.com/images/titleWHY.jpg" />
<p>It allows your potential clients to reach you in a way of which is comfortable to them. The internet is vast and every year it grows. There is a demand for websites for businesses or individuals and it helps if you have one. There are many aspects to creating a website and I can help you with some or all of them. <br /><br />These include; Professional Photographs, Logo Design, Web Design, Web Site Maintenance, Basic Search Engine Optimization (SEO), Tutor in FTP Access aka. Dreamweaver. </p>
</div><!--END OF col2-->


<div id="col3">
<p>Request for Estimates Form goes here!</p>
</div><!--END OF col3-->


</div><!--END OF content-->




CSS code
Quote:
#content {
width: 786px;
height: auto;
padding: 0px;

background-image: url(images/BOXmiddle.jpg);
background-repeat: repeat-y;
color: #ffffff;
}




#col1 {
margin-left: 15px;
width: 760px;
height: auto;

padding-right: 10px;
font-family: Georgia, "Times New Roman", Times, serif;
color: #71b23d;
}




#col2 {
float: left;
margin-left: 15px;
width: 350px;
height: auto;

font-family: Georgia, "Times New Roman", Times, serif;
color: #5b4781;
}



#col3 {
float: right;
width: 405px;
height: auto;

font-family: Georgia, "Times New Roman", Times, serif;
color: #5b4781;
}

Last edited by amberGoodwin; 12-09-2009 at 04:26 AM..
amberGoodwin is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 12-09-2009, 07:52 AM Re: Using float makes my background-image disappear
Experienced Talker

Posts: 46
Name: Maneet Puri
Trades: 0
Hi,

Just apply the float property to "content" div and your background will appear.

Hope this helps,
Cheers,

Maneet Puri
__________________

Please login or register to view this content. Registration is FREE
|
Please login or register to view this content. Registration is FREE
maneetpuri is offline
Reply With Quote
View Public Profile
 
Old 12-09-2009, 09:35 AM Re: Using float makes my background-image disappear
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
The problem is that you need to CLEAR your floats - see our stickies for methods to do that. Maneet has given you one method, floating the container will automatically clear the floats within it. Another method is to apply overflow:auto or overflow:hidden to #content.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 12-10-2009, 01:00 AM Re: Using float makes my background-image disappear
Junior Talker

Posts: 2
Name: Amber
Trades: 0
Wow. Thank you so much! Argh! I can't believe I couldn't figure that out! I ended up just putting the #content to float:left

Thank you so much guys!
amberGoodwin is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Using float makes my background-image disappear
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.44691 seconds with 12 queries