“Divitus” and “classitus”
Posted Jan 24th, 2009 by admin
When you’re just starting with CSS, one of the things you’ll notice emphasized is the pattern of using divs instead of tables. This is because historically, divs layout replaced table layouts. But this has also lead to a misconception: that you should rely mostly on divs to present your content. This overuse of div elements [...]
Z-index: don’t expect me to be working without no positioning!
Posted Jan 19th, 2009 by admin
I’m thinking of starting a section for “D’oh Moments” - aka moments where I made a simple mistake but it took me an unusually long time to solve the problem.
In this case it’s z-index, which I was trying to implement to fix a problem on IE (where most of the problems end up being, as [...]
The curse of CSS rounded corners
Posted Jan 11th, 2009 by admin
If you’ve done any sort of work with rounded corners on webpages, you know that they can be tricky to pull off. In any case, it’s a lot harder than it really should be. Working with rounded corners is almost like adding graphical borders around elements as if the CSS border property didn’t exist. It’s [...]
Video: Douglas Crockford, “Web Forward”
Posted Nov 18th, 2008 by admin
Douglas Crockford: “Web Forward” @ Yahoo! Video
Check this out! I was there! I’m the guy fiddling around with the camera in the front row, half paying attention
Wider margin or padding issue in IE6
Posted Oct 13th, 2008 by admin
Not sure why you’re getting wider margins or padding in IE6? It’s a well-known issue with floating div elements, and it even has a specific name: the double margin (or double padding) bug.
The fix is simple. Add this CSS rule to the floating Divs:
display: inline;
As an aside, it’s interesting to note that this fix doesn’t [...]
Centering elements with CSS
Posted Oct 13th, 2008 by admin
If you’re just starting out with CSS, you probably run into the problem of centering elements horizontally. The common way to center an element within its parent container is by applying this:
margin: auto;
Or if you want to be more specific:
margin-right: auto;
margin-left: auto;
(which is the same as this:)
margin: 0 auto;
Still not centered? Make sure the element [...]
Categories
- accessibility (1)
- browser bugs (2)
- css (6)
- html (6)
- javascript (10)
- jquery (4)
- mobile (1)
- performance (2)
- php (1)
- regular expressions (1)
- rss (3)
- seo (1)
- Site News (1)
- table (1)
- Uncategorized (4)
- videos (2)
- wordpress (1)
- xml (2)
- yui (0)