user3668426
user3668426

Reputation: 1

Can I have several fixed width layouts on one page?

Ok, I know how to build fixed width as well as fluid and adaptive layouts. I just wonder if I can accomplish this: - Have fixed width layout for example 960px - Which falls down to another fixed width layout, let's say 640px, if screen get's smaller than 960px. Thanks!

Upvotes: 0

Views: 29

Answers (1)

Piyush Kumar Baliyan
Piyush Kumar Baliyan

Reputation: 404

You have the ans in media queries, use this:

@media all and (min-width: 960px) {
    #content {
        width: 960px;
    }
}
@media all and (max-width: 959px) {
    #content {
        width: 640px;
    }
}

The fiddle is here: http://jsfiddle.net/piyushkmr/V4Q2m/1/

Upvotes: 2

Related Questions