Archive / CSS

RSS feed for this section

HTML Email CSS Guide

This guide is a must use for sending HTML email newsletters:

Vertically align image to the middle

I was trying to align some text to an image vertically. I used the align attribute like this: <img height=”28″ src=”/images/connect-phone.gif” width=”26″ align=”middle”> 234-234-2342 But this didn’t work in Firefox or Safari. So I sought out the CCS alternative. I came across this article explaining how to do it: . Here is the code […]

IE6 Float Bug

Lots of people like CSS and it certainly has it’s place. But when the most popular browser has a bug that prevents a simple div element from displaying properly we all get frustrated. All I wanted to do was have a box “float” to the right side of the page. It works great in IE7 and Firefox. […]

CSS Page Break with IE 7

To force a page break when printing the style=”page-break-before: always;” can be added. But this doesn’t always work with IE 7. For some reason IE 7 would ignore this. Probably because of the new print preview and “size to fit”. The simple fix to get IE 7 to recognize the page break just add something to […]

Background color change with roll over

Use this code to cause a row’s background color to change with a mouse over: <tr style=”background-color: #F4F9FF;” onmouseover=”’#C1D0E4′;” onmouseout=”’#F4F9FF’;”> This works in IE and FireFox. Here is an example:

CSS Alignment Tip

When positioning text on a page in CSS add this code to view the element borders: border-width: thin;┬áborder-style: solid; That way you can see where the spaces are and can adjust the elements spacing.