HTML is a semantic markup language, used to describe its contents. It is never to describe how its content *looks* nor *behaves*.
CSS is for describing how your content LOOKS.
Javascript is for describing how your content BEHAVES.
Tables are just part of HTML — and they have a place in marking up content: they are for tabular data.
If you content is something you’d use in Excel, it is a good choice for a table.
If you are using a table to position content on the page or “make things line up” then you are misusing HTML for layout purposes.
Showing posts with label HTML. Show all posts
Showing posts with label HTML. Show all posts
Saturday, June 12, 2010
Friday, October 24, 2008
DIV shrink-to-fit width
You need to give the DIV shrink-to-fit width, which you can get by
giving it display: inline-block, display: table, display: table-cell or
float: left. float: left is probably the most widely supported.
giving it display: inline-block, display: table, display: table-cell or
float: left. float: left is probably the most widely supported.
Friday, September 26, 2008
ScrollTop in IE
IE6 and DTD 4.01 requires you to use document.documentElement in stead of document.body, so u will need somthing like the below:
Taken from this post
It was used in a very important fix in our code.
if (document.documentElement && !document.documentElement.scrollTop)
// IE6 +4.01 but no scrolling going on
else if (document.documentElement && document.documentElement.scrollTop)
// IE6 +4.01 and user has scrolled
else if (document.body && document.body.scrollTop)
// IE5 or DTD 3.2
Taken from this post
It was used in a very important fix in our code.
Subscribe to:
Posts (Atom)