4 replies [Last post]
madsny
madsny's picture
User offline. Last seen 1 year 23 weeks ago. Offline
newbie
Timezone: GMT+2
Joined: 2010-08-25
Posts: 2
Points: 3

Hi guys.

First of all:
im new in here so hello to all, im not that new to CSS but must classify myself as novice eger to learn Smile.

about:
need some advice on best practice and approach for a specific layout structure

Question:
Im currently working on a new version of my website, im going for a full frame version, one which expands 100% horizontal but where all content has a fixed width and centered in the browser window, catch here is, the page should be build up of section each having different colors/bg's which should stretch 100% of the browser

screen. i've attached a layout structural sketch in this post

my question is then, what would be the best approach for this type of layout, i've look all at a lot of css layout examples, mostly fluid versions, but non of them really talks about this type of layout including how to structure and positing DIV elements within the center content areas.

i did make some examples and tests, but they are't cross compatible, reason for not linking to these is, i'll rather have an discussion about best pratics and solutions for this type of layout than discussing precise elements in previous tests.

any suggestions, ideas, links, tut's or the like ??

webframework.jpg

best
// Mads

CupidsToejam
CupidsToejam's picture
User offline. Last seen 2 weeks 1 day ago. Offline
rank Guru
Guru
Timezone: GMT-6
Joined: 2008-08-15
Posts: 2634
Points: 1552

ok, so the design is fixed,

ok, so the design is fixed, but you want the background of each row to expand 100%? Create an image that has all the rows and colors in it you need. crop it so its 1px wide. apply this image as a background to either the html or body tag, and repeat-x.

body {
  margin: 0; padding: 0;
  background: white url(image.jpg) repeat-x;
 
}


First basic few steps in building a webpage
1. Gather and collect content.
2. Organize the content into meaningful semantic valid HTML
3. Design the prototype
4. Style using CSS

http://www.pixelbehavior.com

mpoveda
mpoveda's picture
User offline. Last seen 45 weeks 1 day ago. Offline
rank Enthusiast
Enthusiast
Timezone: GMT-6
Joined: 2007-06-22
Posts: 101
Points: 25

Maybe this will help: This

Maybe this will help:
http://www.webdesignerwall.com/tutorials/how-to-css-large-background/

This work for big background images, what you need is just a single pixel wide image with full height repeated in x axis, but this will help you get a basic idea.

..."Many of my friends have moved away. They search in other places for happiness. Little do they know that there is nothing to be found out in the world to give you happiness for happiness does not originate from "out there"...

madsny
madsny's picture
User offline. Last seen 1 year 23 weeks ago. Offline
newbie
Timezone: GMT+2
Joined: 2010-08-25
Posts: 2
Points: 3

thanks for the quick

thanks for the quick replies..

ahh yes i think i forgot to mention that the layout is should be able to take dynamic content from a CMS system, meaning the height for each content section would differ, so the overall background image trick won't do any good, other than styling an isolated vertical section.

did that make any sense.. so basically it's fluid in vertical direction with centered content elements which again must contain fluid elements af any kind.

Wink
wish i could find an example, i think for some footers which expand 100% with centered content do something similar

CupidsToejam
CupidsToejam's picture
User offline. Last seen 2 weeks 1 day ago. Offline
rank Guru
Guru
Timezone: GMT-6
Joined: 2008-08-15
Posts: 2634
Points: 1552

ok, then apply 100% width to

ok, then apply 100% width to each div, then use margins to position the div content.


First basic few steps in building a webpage
1. Gather and collect content.
2. Organize the content into meaningful semantic valid HTML
3. Design the prototype
4. Style using CSS

http://www.pixelbehavior.com