I recently came across the task to re-design a web site written in HTML from the last millenium. Having absolutely no control over the HTML which was generated by some pre-historic ASP code, the only option was the intensive usage of CSS. I found tags and parameters in there I didn’t even know existed!

When I started getting serious about web design and leave Dreamweaver behind – I’ve never looked back – I jumped right into XHTML and CSS using DIV tags instead of table layout.

Seeing a HTML document that is table based, runs in quirks mode and uses tags like <font> and <b> has become rare – fortunately. But that was what happened to me. I had to use every ugly CSS hack in the book to make this site behave.

One of the problems I came across, was the align parameter for img tags – it’s actually still quite common. How do you override this one with CSS?

The Solution is simple: with the float command.



<img src="myPicture.jpg" alt="" align="right" />

Override with CSS:

img { float: left }

Posted Tuesday, April 21st, 2009 at 4:58 pm
Filed Under Category: CSS
You can leave a response, or trackback from your own site.


Leave a Reply