Perfect three-column page layout example

Source: Internet
Author: User

Recently in the internal discussion about the "perfect three columns" topic, see a "in Search of the Holy Grail", quite good. Therefore, translation.

In Search of the Holy Grail

I'm sorry I didn't name the article. I'm not trying to exaggerate his importance or belittle other Holy Grails. But that's what it's called, and we all know what it means.

Three columns, one is a fixed-width navigation bar, the other is a Google ad, or a filckr picture display, just like fancy's truffle chocolate, and an important silky sandwich. In this blog popular Golden Age It is quite applicable, coupled with a considerable degree of difficulty in achieving the "Holy Grail," a well-deserved name.

There are a lot of articles to discuss about the "Holy Grail", and there are a lot of good templates to use. However, all schemes are at the expense of the following characteristics: reasonable content order, width adaptive, reasonable label. These three are often the elements of a compromise that is difficult to achieve in a reasonable layout.

In a recent project, I finally found the legendary Holy Grail. I can describe him as much as possible without changing your code and flexibility. He would be:

  • An adaptive center and fixed-width sidebar
  • Allow intermediate content to appear in code before others
  • Allow any one column to be the highest height
  • Just need an extra div tag
  • Very simple CSS code and very few hack patches

Standing on the shoulders of giants

This technique is inspired by Alex Robinson's one True Layout. He once described several questions about the Holy Grail in his article, but his solution required two packages and required a parent div for each column, otherwise it would be difficult to write the inner structure.
On the other hand, it was written by Eric Meyer's, who took advantage of multiple types of unit-mix positioning. It also uses a fixed sidebar and an adaptive central layer, but unfortunately, he relies on an approximate percentage, not a fixed value, and fills a layer that is adaptive to the width of the screen with a different resolution.



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.