Friday, July 4, 2008

Doctype - margin / padding problem with HTML

Some may come across the problem...

<!DOCTYPE html PUBLIC....

if you use any doctype in our page, then some unwanted padding/margin will appear with images / tables / td s will be added automatically in your page....

You want to remove them...? Then add this css code in to your page

html, body, div, span, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, code,
del, dfn, em, img, q, dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td {
margin: 0;
padding: 0;
border: 0;
}

Thats all...
Cheers!

No comments: