Liam Delahunty: Home Tips Design Web Words Links Contact

 

Panda Internet Security 2007 - $15 Discount Coupon
CoffeeCup Software
Download Free Web Design Software Here

Sponsors:

Recommended laptop
under £500
.

Think I deserve a present? See my Amazon Wish List


Class Names

Float


 

Well, this time it's my fault really... I was using the following code in my CSS file.

div.float {
float: left;
border: 1px solid #000000;
text-align: center;
background-color: #3366cc;
margin: 10px;
padding: 2px;
}

div.float img {
border: 1px solid #000000;
}

div.float p {
text-align: center;
margin: 0px;
padding: 0px;
}

div.float A {
text-decoration: none;
font-size: 0.8em;
}

... and while it looked just hunky dorey in IE 5.5, it looked a bit crap in everything else. What was supposed to happen was that the images are put into their own float div/class and would wrap then nicely around the page. No need for tables, the layout looks neat and all is well in Liam land. However in Opera 6.01 it just displayed as a single column. I discouvered after much tinkering with the code, that Opera wouldn't allow me to use the word float as the name of the class. Fair enough really... here's the new code..

div.floatl {
float: left;
border: 1px solid #000000;
text-align: center;
background-color: #3366cc;
margin: 10px;
padding: 2px;
}

div.floatl img {
border: 1px solid #000000;
}

div.floatl p {
text-align: center;
margin: 0px;
padding: 0px;
}

div.floatl A {
text-decoration: none;
font-size: 0.8em;
}

.. and here are some examples.

Wild Cornflowers

Wild Cornflowers

Wild Cornflowers

Wild Cornflowers

Wild Cornflowers

Similar: A long time ago I wrote this Netscape 6 CSS problem with underscores.

Share this!  



Css Class Float Width | Css Class Name Float | Css Colour Tool


 

  Tips | Home | Search | Contact

Link here: