WeLoveCSS Logo
Home Profile Members Search Rules Help New Posts



WeLoveCSS > WEB DESIGN > CSS > CSS not behaving properly

Reply
  Thread Tools Display Modes
Old 25th August 11, 12:43 PM   #21
bgareth
WLC Member
 
bgareth's Avatar
 
Join Date: Jul 2010
Posts: 40
Default Float not working

Hello, took into account padding within the overall width declared in the containers, nested the actual column div within the container div, floated the columns right, declared the overall outer margins in one body div but the columns aren't floating - eeeeekkk

www.garethgroup.com/test/floatcolumnsattempt/index.html

Thanks
__________________
Kind Regards,

Ben
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
bgareth is offline   Reply With Quote
Old 26th August 11, 08:32 AM   #22
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,194
Default Re: CSS not behaving properly

they are floating, it's just that you cannot see that they are.

Your floated elements are 100% wide in a 21% wide NON-floated parent container, so were are they supposed to float to, other than the extreme right of the PARENT container??
chrishirst is offline   Reply With Quote
Old 27th August 11, 03:11 PM   #23
bgareth
WLC Member
 
bgareth's Avatar
 
Join Date: Jul 2010
Posts: 40
Default Re: CSS not behaving properly

Ah, i've sorted it! Interestingly, why is there a white gap between the colour blocks in Chrome that don't appear in IE9 or Firefox and why in all the browsers is the 2px margin top not the same as the margin right and left despite my single value for the body:

Code:
#body { 
                     margin:2px;
}
Also is there any need for those containers and what exactly are they doing?

Thank you :-)

www.garethgroup.com/test/floatcolumnsattempt/index.html
__________________
Kind Regards,

Ben
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.

Last edited by bgareth; 27th August 11 at 03:38 PM.
bgareth is offline   Reply With Quote
Old 27th August 11, 04:08 PM   #24
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,194
Default Re: CSS not behaving properly

Why do you have all the extra containers?
chrishirst is offline   Reply With Quote
Old 27th August 11, 10:02 PM   #25
bgareth
WLC Member
 
bgareth's Avatar
 
Join Date: Jul 2010
Posts: 40
Default Re: CSS not behaving properly

Oh I wasn't sure...I was just following some advice having them there. I've now got rid of them and it works just as well. What I don't understand is why my body margin isn't 2px the whole way round. I've also attempted to set a min-height of 98% but that isn't working either...

Seriously thanks for your guidance

Hope you are having a nice weekend
__________________
Kind Regards,

Ben
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
bgareth is offline   Reply With Quote
Old 27th August 11, 11:42 PM   #26
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,194
Default Re: CSS not behaving properly

98% of what?

you have to understand that the html & body elements also follow the box-model,.

The content area does not fill the viewport. The viewport being the area between the inside of the window top edge below any toolbars and the inside of the bottom edge above the status bar.
And horizontally from the inside left edge to the inside of the right edge minus the scroll bar if visible.

The body content area will fit the view port width upto the margins, but the length only extends to the length of the content.

If you want to fill the view port you need to give the body and html element a 100% height.
chrishirst is offline   Reply With Quote
Old 3rd September 11, 06:11 PM   #27
bgareth
WLC Member
 
bgareth's Avatar
 
Join Date: Jul 2010
Posts: 40
Default Re: CSS not behaving properly

Hi there, 98% column height. I've just made the amendments you suggested but it still doesn't seem to be working. I had however imposed a min-height on the columns.

Thanks..

http://www.garethgroup.com/floatcolu...mpt/index.html
__________________
Kind Regards,

Ben
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
bgareth is offline   Reply With Quote
Old 4th September 11, 06:09 PM   #28
chrishirst
Banned
 
Join Date: Jun 2006
Location: Blackp ool U.K.
Posts: 3,194
Default Re: CSS not behaving properly

404 error on that URI
chrishirst is offline   Reply With Quote
Old 4th September 11, 06:51 PM   #29
bgareth
WLC Member
 
bgareth's Avatar
 
Join Date: Jul 2010
Posts: 40
Default Re: CSS not behaving properly

http://www.garethgroup.com/test/floa...mpt/index.html

:-)
__________________
Kind Regards,

Ben
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
bgareth is offline   Reply With Quote
Old 4th September 11, 10:33 PM   #30
bgareth
WLC Member
 
bgareth's Avatar
 
Join Date: Jul 2010
Posts: 40
Default Re: CSS not behaving properly

http://www.garethgroup.com/test/floa...mpt/index.html :-)
__________________
Kind Regards,

Ben
To view links or images in signatures your post count must be 5 or greater. You currently have 0 posts.
bgareth is offline   Reply With Quote
Reply


Thread Tools
Display Modes
Linear Mode Linear Mode

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

Forum Jump


All times are GMT. The time now is 04:54 PM.



Home | Advertise | Contact Us | Top
Home | Advertise | Contact Us | Top

Copyright 2006 WeLoveCSS.com. All Rights Reserved.
Powered by vBulletin Version 3.8.4 Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.