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

Posts: 63
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 11:18 AM.
soap is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 04-10-2008, 03:49 AM Re: floats conquer me again.
Skilled Talker

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

Posts: 5,973
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 offline
Reply With Quote
View Public Profile
 
Old 04-10-2008, 06:13 PM Re: floats conquer me again.
Skilled Talker

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

Posts: 63
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, 09:12 PM Re: floats conquer me again.
whym's Avatar
Putting food on my family

Latest Blog Post:
Hardware orchestra
Posts: 3,371
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 | Whym hosting | My blog

30% discount for life on any hosting package - enter "30PC" at signup
whym is offline
Reply With Quote
View Public Profile Visit whym's homepage!
 
Old 04-10-2008, 09:17 PM Re: floats conquer me again.
Skilled Talker

Posts: 63
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




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

 


Page generated in 0.12781 seconds with 13 queries