Reply
floats conquer me again.
Old 04-10-2008, 04:23 AM floats conquer me again.
Super Talker

Posts: 109
So I thought I had finally gotten the better of floats with clear and overflows and stuff, but apparently not.

link : http://opensecretdev.com/tim/

css:
Code:
div#wrap {
    background-image:url('images/bg.jpg');
    background-repeat:repeat-y;
    width:830px;
    height:100%;
    margin:0 auto 0 auto;
    text-align:left;
    border:2px solid red;
    }
    
div#head {
    width:830px;
    height:95px;
    background-image:url('images/header.jpg');
    }
    
div#nav {
    margin:0 auto;
    width:710px;
    padding-top:10px;
    }
div#content {
    width:400px;
    margin-left:60px;
    float:left;
    }
div#right1 {
    width:268px;
    height:194px;
    float:right;
    background:url('images/scientificMarketing.jpg') no-repeat;
    margin-right:60px;
    margin-bottom:10px;
    
    }
div#right2 {
    float:right;
    width:268px;
    height:347px;
    background:url('images/actualResults.jpg') no-repeat;
    margin-right:60px;
    margin-bottom:30px;
    }
#clear {
    clear:both;
    width:760px;
    }
I tried overflow:auto and got scroll bars
I tried overflow:hidden and got cut off content
I tried clearing below the floated elements and wrap still won't surround them.

Thank you in advance.

Last edited by LadynRed : 04-10-2008 at 12:18 PM.
soap is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
Old 04-10-2008, 04:49 AM Re: floats conquer me again.
Super Talker

Posts: 109
uhh i forgot to add a doctype, nevermind.
soap is offline
Reply With Quote
View Public Profile
 
Old 04-10-2008, 12:21 PM Re: floats conquer me again.
LadynRed's Avatar
Super Moderator

Posts: 6,746
Location: Tennessee
You DO have an error there. You've used <div id="clear"> more than once. ID's MUST be unique. If you want to reuse CSS rules, make it a CLASS instead.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!
"Using or working with IE is like having to wear a 1970's polyester suit with pantyhose and a girdle, to work everyday"
Carolina Corvette Club
LadynRed is online now
Reply With Quote
View Public Profile
 
Old 04-10-2008, 07:13 PM Re: floats conquer me again.
Super Talker

Posts: 109
ah, thanks i didn't know that!
soap is offline
Reply With Quote
View Public Profile
 
Old 04-10-2008, 09:59 PM Re: floats conquer me again.
Super Talker

Posts: 109
Also... I've have this recurring problem where i have wrap set to 100% height, but the content does not bring it down to the bottom of the window, then it stops.
Is that understandable? Should I just use a min-height?

Thanks!
soap is offline
Reply With Quote
View Public Profile
 
Old 04-10-2008, 10:12 PM Re: floats conquer me again.
whym's Avatar
Putting food on my family

Posts: 3,429
Name: Daniel
Location: A sleepy town in Mid Wales
You might find this thread useful - if you want your div to be 100% of the height of the browser window regardless of the resolution.

Dan
__________________
Whym Web Design - article blog| Personal blog

I need your help - sponsor me!
whym is offline
Reply With Quote
View Public Profile Visit whym's homepage!
 
Old 04-10-2008, 10:17 PM Re: floats conquer me again.
Super Talker

Posts: 109
You're all so helpful and I am very grateful.

Thanksss
soap is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to floats conquer me again.
 

Thread Tools

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

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


Webmaster Resources Marketplace:
Software Development Company | Webhosting.UK.com | Text Link Brokers 


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

 


Page generated in 0.13687 seconds with 12 queries