css

clear

SOFTWARE: css

clear: left, right, none, both;

clear div after float elements. Options are left, right, none or both.

MORE INFO:

cross-browser height for tabs navigation

SOFTWARE: css

give ul or div height as PERCENTAGE

IE7 was getting different height of navigation tabs (unordered list set to diplay inline) than Firefox, Safari etc. To fix, I gave the ul a height in percentage instead of px or ems. The value of the percentage in my case doesn't matter. For example, I can change it to 10%, 5% etc. with no visual difference. But, it makes everything display the same in all browsers I tested.

globalnav {height:5%;}

Cool stuff.

MORE INFO:

Internet Explorer conditional styles

SOFTWARE: css

To call a different stylesheet that includes special css fixes for IE versions less than IE7, add this in your head section while calling stylesheets:

<!--[if lt IE 7]>
<link rel="stylesheet" type="text/css" href="/css/ie6.css">
<![endif]-->

You can do other nifty things with this logic, like calling a special javascript file. Since only IE sees the conditional anyway, other browsers will skip it.

MORE INFO: http://www.456bereastreet.com/archive/200612/internet_explorer_and_the_css_box_model/

css table

SOFTWARE: css

table .classname {color:red;}

Style tables with CSS example. Can be modified to add border to entire table, background colors, padding etc. Cool stuff.

HTML:

<table class="sampleclass">
<thead>
<tr><th>header</th></tr>
</thead>
<tbody>
<tr><td>stuff</td></tr>
</tbody>
</table>

CSS:

.sampleclass {color:black;}
table .sampleclass {color:green;}
.sampleclass th {color:red;}
.sampleclass td {color:blue;}

etc.

MORE INFO:
Comments