Posts Tagged ‘CSS’

Quick Tip: Remove right margin from column post layout with php

May 8th, 2010
column-layout-error

One of the most popular layout styles right now is the Three Column grid, particularly for News-like websites. Well, one of the main problems coders will run into when creating the layout with CSS is how to make all the columns fit correctly, while retaining the correct margins. What often happens is the first two columns look great, but then the third margin will screw up because the right-margin, for example, has pushed the column outside of the containing div. The problem ...

Alternate Your Comment Colors

March 8th, 2010
even-odd

Effectively styling comments can be a difficult task. One tip to make your comments more readable is to alternate their background colors. By default, Wordpress assigns a class of "even" or "odd" to each comment in the list; the first is odd, the second even, the third odd, etc, etc. So, to achieve the desired effect, put this in your style.css: li.even { list-style: none; background: #FFFF; } li.odd { list-style: none; background: #F9F9F9; } Add in a few other styling elements, such as borders and clever margins, and you can get some ...

Override Inline Styles

February 26th, 2010
inline-styles

A few weeks ago I ran into a problem while styling some elements in a wordpress plugin. The source of problem was that the plugin author had used inline styles to control the elements. This prevented my user-defined styles from applying. Rather than manually going into the plugin source and removing the styles (any modifications would be over ridden if I ever updated the plugin), I found a solution posted by Natale Jost. It's really simple. Your original style looks something like: div ...