• Home
  • About
  • Articles and Presentations
  • Contact Me
  • Upcoming Presentations

Library Web Chic

Resources for librarians who are interested in the application of web design and technologies in libraries

Feed on
Posts
Comments

Setting Width using CSS

Jul 2nd, 2004 by Karen

Setting Width using CSS

A collegue of mine is working on a redesign of our library's website and we were talking today about setting the width of an element. One classic problem that occurs when you layout a page in columns using CSS and relative measures is that your columns can be really squished if your user choose to resize the page drastically. So much so that your page becomes difficult to look at and loses all coherence. One way to deal with this. Beside using absolute measures, is to use the min-width property. This property lets you tell a web browser that a give element can be no smaller than a particular size. This allows you to keep the user from distorting the page too badly. The only problem is that when you choose your min-width you have to base it on some minimum screen resolution. Typically, I base mine on 800×600 because this is the resolution that best accomodates the majority of my users. I know this because of information I collect in my web server logs. The only problem with this is that Internet Explorer in some circumstances chooses to ignore the min-width property. The way I have found to deal with this is to put the min-width line first in the list of properties that I am assigning to a given tag.

Example:

h1 { min-width:600px;
        width:75%;
}

This allows my page to resize for people with a screen resolution greater than 800×600 but doesn't let the page be distorted completely if the user has a smaller screen resolution or decides to use the browser to make the window small. For me this seems to be the best compromise for providing a site that looks nice and consistent but also is relatively liquid from one platform, screen resolution, and browser to another.

Posted in CSS | No Comments

Comments are closed.

  • Recent Posts

    • Notes from the Social Software Showcase
    • Top Tech Trends ALA 2008
    • ALA Madness
    • Cool Tools from OCLC
    • Hosting virtual discussions
    • Our Book is out!!
  • Categories

    • AJAX (1)
    • BLeading Edge Thoughts (4)
    • Blogging (23)
    • Chat (3)
    • Coldfusion (2)
    • CSS (14)
    • Digital Libraries (3)
    • Findability (2)
    • General Thoughts (410)
    • Library Systems (16)
    • Linux (3)
    • LITA Top Tech Trends (1)
    • Mac (5)
    • Nifty Tools (6)
    • Notes from the Field (105)
    • Ongoing Projects (7)
    • open source software (5)
    • OpenURL (8)
    • Podcasting (1)
    • Presentations (1)
    • RSS (32)
    • Social Software (5)
    • Tech Configuration Tidbits (1)
    • Tech Demons (11)
    • Usability (11)
    • Web 2.0 (5)
    • Web Services (3)
    • Web Standards (1)
    • Wikis (7)
    • XHTML (3)
    • XML (19)
  • Archives

    • 2008
      • July
      • June
      • May
      • April
      • March
      • February
      • January
    • + 2007
      • December
      • November
      • October
      • September
      • August
      • July
      • June
      • May
      • April
      • March
      • February
      • January
    • + 2006
      • December
      • November
      • October
      • September
      • August
      • July
      • June
      • May
      • April
      • March
      • February
      • January
    • + 2005
      • December
      • November
      • October
      • September
      • August
      • July
      • June
      • May
      • April
      • March
      • February
      • January
    • + 2004
      • December
      • November
      • October
      • September
      • August
      • July
      • June
      • May
      • April
      • March
  • Pages

    • About
      • CV
    • Articles and Presentations
      • AJAX Presentation
      • Incorporating Web 2.0 into Library Websites
      • Library 2.0 and Web 2.0, Changing the Face of Professional Development
      • Next Stop Blogging
      • Observing and Analysing Library Website User Behavior (CIL 2006 Postconference)
      • Open Source Software for Library Websites Presentation
      • Social Software for Reference Services Presentation
      • TLA 2006 Presentation
      • Upcoming Presentations
      • Using Blogs for Internal Communications
      • WorldCat Wordpress Widget
    • Contact Me
    • Stories - Tutorials and Code Demonstrations
      • Feedburner
      • Incorporating XML Content Into Your Web site (ASP)
      • Making your blog friendly to mobile devices
      • Print Style sheets
      • Server-side and Client-side includes, explanations, applications, and examples
      • Web Server Log Analysis Tools and Tips
      • Wordpress and Tags
    • Tag Cloud
  • Meta

    • Log in
    • Valid XHTML
    • Powered by Wordpress
    • Get Firefox!
    • I See Blog People
    • AIM Status
  • Creative Commons License

    MistyLook made free by Web Hosting Bluebook