I know you\’ve done it before. I think we\’ve all done it. You have a container with a floated element inside. The container doesn\’t wrap around everything, thus causing the element to break outside of the container. To fix this, we\’d usually add a clear element at the bottom of the container so it would wrap everything within. But there is a better solution, which uses two CSS properties. For this example, I\’ll place the styles inline.. please don\’t hate me. Continue reading CSS Best Practice #3: Clear Floated Containers (with Height||Width and Overflow)
Category: HTML / XHTML
Solution to Flash and Select Drop-downs Covering HTML Elements
I\’ve positioned elements absolutely and had to deal with a bug where the element appears below a flash object or select drop-downs, which usually occurs in IE. I\’ve seen a few solutions, which work great, and I have one more to add. Continue reading Solution to Flash and Select Drop-downs Covering HTML Elements
Dustin Diaz on DocTypes
I just had to share this one with you as soon as I read it. Dustin Diaz shows us a way of declaring a doctype, that puts the browser is standards mode. Thought it won\’t validate, which he explains:
There is really, absolutely no reason you need the rest of the doctype in your declaration unless you’re validating code. Furthermore, it does not mean that your page is even invalid. In the end, it puts your webpages into standards mode, which is what really matters.
Get Around Form submit() Mapping
If you\’ve had to use javascript to submit a form, you may have used the forms submit() method. You may also experienced difficulty, such as a \”submit is not a function\” error. It has to deal with mapping and I\’ve got a very simple solution. Continue reading Get Around Form submit() Mapping
Two columns with unordered lists
David Walsh recently posted \”Get WordPress Post Categories\”, where he talked about using the wordpress get_categories() function to create a two column list of his categories in his theme.
I offer a slightly different approach using an unordered list. Continue reading Two columns with unordered lists