Archive for the 'CSS' Category

Set space between list item and bullet (HTML, CSS)…

Problem I’ve just had to convert a Photoshop visual to a WordPress template. The designer wanted a bulleted list where the bullets themselves were very close to the list items, and were small dashes. Cross browser support for list item and bullet styling is ropey at best, and to make things perfect I’d have to [...]

Centre and float a div over page content with CSS – no hacks, cross browser

Problem If you need to center a div (or any another block element) over the rest of the content in a page, and you need it to be cross-browser and valid (CSS and XHTML)… Solution Try the following CSS in your stylesheet or page head: #cdiv { position:absolute; /* important. */ left:50%; /*important if you [...]