Spruce • 3 February 2009 • The SnowBlog

Spruce

          
ColoradoSpruce.jpg
Have tinkered with the banner on the site. My hope is that it will subliminally encourage you to buy the current month's new offering. [in spooky voice] Buy...the book...of shadows... it's really... gooood... With major hat tips to Trenton Moss for this: 6. Fixed width web page not sitting in centre of windowGot a fixed width website and can't get it to centrally align in the window in Internet Explorer? Or you can get it to centrally align in IE but not in any other browser? Fear not, it's not your fault! Unfortunately, the correct way of centrally aligning content through CSS doesn't actually work in IE: #container { width: 770px; margin: 0 auto } The second command, margin: 0 auto, basically gives our containing element an automatic margin on the left and right, thereby positioning the containing element in the centre of the browser window. IE however, will need slightly different commands to make this work: body { text-align: center } #container { width: 770px; margin: 0 auto; text-align: left } This will then centrally align the container in IE too. To prevent the text from centrally aligning too, we insert text-align: left into the container div. Trenton, I don't know you, but I love you.

Emma

The SnowBlog is one of the oldest publishing blogs, started in 2003, and it's been through various content management systems over the years. A 2005 techno-blunder meant we lost the early years, but the archives you're reading now go all the way back to 2005.

Many of the older posts in our blog archive suffer from link rot. Apologies if you see missing links and images: let us know if you'd like us to find any in particular.


Read more from the SnowBlog...

« Proud Bookworm Interview
Thanks, Catherine! »