3 replies [Last post]
abus
abus's picture
Offline
Regular
Turkey
Last seen: 13 years 38 weeks ago
Turkey
Joined: 2007-09-24
Posts: 14
Points: 0

Hi,

I have decided to use it this time;

#header:after
{
content: ".";
display: block;
height: 0;
clear: both;
visibility: hidden;
}

/* Hides from IE-mac \*/
* html #header {height: 1%;}
/* End hide from IE-mac */

But it fails in IE7 and Safari, you can check the website at http://www.abus.terzzi.com/ogrev do I need something more in my css or what?

Also an example from my xhtml structure about where I use it



Best Regards

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 36 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

New

New :?

It's commonly used and excepted as one of the methods to achieve float containment, when setting dimensions or overflow isn't an option, and works for IE7

It would help though if you used the complete set of rulesets Wink if you look around you'll find documentation, after all the author and originator of the technique is this forums founder.

The way you are writing the rules means that you do not have to apply a class, but this isn't the best way of using it, better to make it a class rather than attach the pseudo element :after to an element which just restricts your use of this containing method.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me

abus
abus's picture
Offline
Regular
Turkey
Last seen: 13 years 38 weeks ago
Turkey
Joined: 2007-09-24
Posts: 14
Points: 0

This link was very helpful

Than, It is only new for me Smile

http://csscreator.com/?q=attributes/containedfloat.php

I found this link very useful and now it works great on IE7 too. I still need to work more for Safari but maybe the problem is not about the float even.

Thanks for your answer Hugo

Hugo
Hugo's picture
Offline
Moderator
London
Last seen: 6 years 36 weeks ago
London
Joined: 2004-06-06
Posts: 15668
Points: 2806

Haven't got my Mac booted at

Haven't got my Mac booted at the moment but Safari should work with all float containment methods that work for Modern browsers, but then again Safari can - at times - be a real pain in the a*se.

Before you make your first post it is vital that you READ THE POSTING GUIDELINES!
----------------------------------------------------------------
Please post ALL your code - both CSS & HTML - in [code] tags
Please validate and ensure you have included a full Doctype before posting.
Why validate? Read Me