skip to content rich footer

stevenclark.com.au

subscibe to the StevenClark.com.au rss feed

Using the HTML Selector to Skin a Design Cat

The recent article on Web Designer Wall titled How to: CSS Large Background proposes a few ways to achieve large background designs for your website using Cascading Stylesheets (CSS). There is a paticularly good tip in Example 1 for single image backgrounds where the body selector is given values of width: 100%; and display: table; to prevent background shifting on browser resizes in Firefox.

In Example 3 Sky Background a second image is required in the design. The second image was originally achieved by using a #wrapper div, and I agree this is not an ideal situation because this extra div sitting in the Hypertext Markup Language (HTML) is a direct cost of the design strategy. If it could be avoided then that would be great. The div is a generic container and we should trim them out wherever we can’t justify their presence.

The updated solution for Example 3 Sky Background uses a HTML Selector in the CSS, rather than the #wrapper div in the HTML. If that makes sense. It’s a simple enough idea. One image is called into the html selector, and the other is called into the body selector – your CSS file now handles multiple backgrounds and you have leaner HTML markup. It’s important to think laterally when you’re working on design decisions, and the simple solutions work best. Lesson learned.

Comments are closed.

Social Networking

Keep an eye out for me on Twitter

About the Author

Steven Clark Steven Clark - the stand up guy on this site

My name is Steven Clark (aka nortypig) and my passions are business, web development, photography and writing. My current CV [PDF 775KB] is available for download. Currently I'm completing my 2 final units of a post-graduate university degree of MBA (Journalism and Media Studies) at the University of Tasmania.

Photography

My fine art photography is available online at Steven Clark Studio. You may also enjoy my photo blog Walk a Mile in my Shoes.

Recently Reviewed Books

Site Supporters

Hosted by Brett Drinkwater at Tashosting who is always there at the other end of my every inconvenient question and technical crisis. Brett's local community support for us over the last five years is greatly appreciated.

skip to top of page

Currently Reading

Light Science and Magic by Hunter, Biver and Fuqua - cover

The time has come for me to get more involved in upping my technical photography skills if I hope to embark on a Master of Fine Art and Design (Photography) next year. To that end my first book is the highly recommended Light Science & Magic: An Introduction to Photographic Lighting (Third Edition) by Fil Hunter, Steven Biver and Paul Fuqua. What really differentiates this book is the comprehensive set of exercises and the detailed explanation of the underlying science of light in the real world that encompasses the reader's journey.