Tag Archives: CSS

Making inline-block Work in IE 7

When you want to make a <ul> to list horizontally and to wrap you normally set the style display: inline-block. In IE 7 simply doing this will not make it display correctly. It will just display as one vertical column. You will need to add the following style attributes that are specific to IE to […]

Display TD Border With No Table Cell Content

Some browsers will not show a table cell border or background if their is no actual content in the cell. You will need to set the following style to display cell formatting no matter if their is content or not. <style> .mytable td { empty-cells:show; } </style>

CSS: Vertically Align Div or Any Block Type Object Inside a Div

This is one of the most common ways to vertically align a div or any block type object within a div. The child object has to be a fixed height for this to work. Only block objects such as div, img or p tags can have a fixed height. You can also make inline type […]

CSS: Horizontally Centering DIV of Unknown Width

The following example will show how to center a dynamic div of unknown width within another div. Since there is no dimensions you cannot center using margin: auto or text-align: center for Internet Explorer. You will have to do some css trickery to center it for IE. Will be centering a crude menu bar within […]