« Shared bookmarks | Main | Seven items for crisis communications »

July 15, 2004

Four-hour timesaver

HANDELAAR -- While John Handelaar tirelessly tweaked the CSS layout behind his search-engine-friendly, 25000-legacy-articles gallery, he hit upon a finding that stemmed from four hours of tedious web coding. Web developers would do well to benefit from his discovery. He wanted to avoid using tables for the usual reasons. He needed to "put a left button in first and float it left, then the right button floated right, then the larger one in the middle. Our ‘banner’ <div> is set to be text-align center; to make all three be evenly spaced."

Handelaar "hit on a very irritating thing to do with the layout of three obligatory banners and buttons in the site header ... a DIV called BANNER at the top of a page." Inside that DIV would be a standard banner flanked on each side by a 120x60 button.

He wanted something like Garrett did here.

To get the page-wide effect fitting neatly above a fixed-width site layout of 760 pixels, which is what he was working with, he put that into a nested container <div>, made sure that was also text-align: center;, but although that works in IE, every other browser doesn't agree.

He forgot one important thing.

The nested container div needs to have explicitly-set margins. margin: auto; fixes that.

If you remember this, you won't have to mess around with a rambling stylesheet for a half day.


Thank John Handelaar for sharing.
x_ref143wd

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d83451945169e200d8350574b053ef

Listed below are links to weblogs that reference Four-hour timesaver:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Verify your Comment

Previewing your Comment

This is only a preview. Your comment has not yet been posted.

Working...
Your comment could not be posted. Error type:
Your comment has been posted. Post another comment

The letters and numbers you entered did not match the image. Please try again.

As a final step before posting your comment, enter the letters and numbers you see in the image below. This prevents automated programs from posting comments.

Having trouble reading this image? View an alternate.

Working...

Post a comment

Essential Educasting Topics

  • #blogging Ryan Tubridy
  • #ictedu
  • #travel on the M8
  • #measureit
  • #retro
  • #NYC Manhattanhenge
  • #language Shola
  • EoghanJennings
  • Recorded at ICT in Education Conference
  • #purposed
  • #egfdell video
  • #journal
  • #resources Free apps like @evernote
  • #ictedu Biros and Webcams
  • @Documentally @MyDolans
  • #event George Lee Opens Pop-Up Bank
  • #news
  • Anti-terrorist Tags
  • #trend Mifi
  • #queensvisit
  • Rock of Cashel
  • #analytics Matt Cutts
  • Road Closed for #QueensVisit
  • #mash2011

My Other Accounts

Delicious Dopplr Facebook Flickr Jaiku Last.fm LinkedIn Other... Skype Twitter Twitter Yahoo!

Edtech News, Audio and Video

Blog powered by TypePad.
Educasting since 2006. View My Stats.