CSS

Good CSS practices to get into.

I just got around to reading an article I bookmarked a while back on webdesignerdepot.com to help improve your CSS code. It's a good read, I highly recommend it.

Here's a little synopsis:

Stay Organized

Use a logical structure in your code. Declare broadest items first, and get more specific as you go. The author recommends:

  • Resets & overrides
  • Links & type
  • Main layout

Solution to background color issue with nested DIV blocks

I just found a simple solution to an issue I've been having for a long time. Many times, I create a wrapper element that contains nested columns in my web designs. For example:


It's so simple! Using CSS to control background image scaling...

Wow. I just read a fantastic, simple article on A List Apart outlining how to create full browser background images. With some very simple CSS, you can scale your background image, up or down, to fit each visitor's browser window.


body {
  background: #000 url(myBackground_1280x960.jpg) ยป
center center fixed no-repeat;
  -moz-background-size: cover;
  background-size: cover;
}

You learn something new everyday! Part 2

So this morning, I headed over to Lynda.com for some refresher training on CSS. There were a couple things I could figure out. I'm still working through those issues, but learned something really cool, and something really useful to know...

A better way to position columns

Design without content is decoration

In my recent surfing, I came across a quote on a site that really struck me:

Content informs design; design without content is decoration.

I find this to be very profound. You can have the most beautiful site on the web, but if you don't have content, it doesn't matter. Sure, people may drop by to see your visual feast, but they won't return, because you have nothing to say.

Syndicate content