View Full Version : layout question
Charmed
06-22-2008, 01:59 PM
How do you make your layout fit across your screen?
like http://mis-placed.org/ see how the pattern fits right across? and the content and sidebars in the middle?
&&SELENA
06-22-2008, 02:07 PM
make a div with the width as 100% with a background as whatever you want to stretch across.
<div style="width:100%; height:whatever; background-image:url(whatev);">
hope that helps.
Charmed
06-24-2008, 04:31 AM
the 100% never looks right, it does in one resolution 1024x768 then in 800x600 the content and menus are all over the place :(
Is there a simpler way to do this without 100%?
Eagle
06-24-2008, 04:53 AM
^ nope, there isn't.
And also make your div sizes in percentages, not pixels. I don't use pixels much anymore, percentages are betterrrrrr.
HyperChick
06-24-2008, 05:29 AM
You can use tables and make them 100% width.
Shadowgraph
06-24-2008, 02:41 PM
^ Don't do that.
Tables are a big NO NO when it comes to designing!!!!
Tables are only meant to be used to store INFORMATION, not for design. That's what Div layers are for.
^ nope, there isn't.
And also make your div sizes in percentages, not pixels. I don't use pixels much anymore, percentages are betterrrrrr.
Yeah, you want your content divs to be percentages too. For example, if you have two divs (content and sidebar) and wanted them to stretch across the whole page, you'd set one to 64% and one to 36% (or 75% and 25%, 60%-40% etc.).
There are some fluid CSS templates here (http://www.tutorialtastic.co.uk/css-templates.php), that you can download, and you can see how it works.
HyperChick
06-25-2008, 04:04 PM
^ Don't do that.
Tables are a big NO NO when it comes to designing!!!!
Tables are only meant to be used to store INFORMATION, not for design. That's what Div layers are for.
I used to make layouts using tables and iframes and everyone thought i used divs because it looked like i did. And the tables was just an idea if nothing else worked out.
&&SELENA
06-25-2008, 05:07 PM
I used to make layouts using tables and iframes and everyone thought i used divs because it looked like i did. And the tables was just an idea if nothing else worked out.
tables make the page load slower, thats why they're bad for designing. i use them too for my layout slices, but thats about all.
Shadowgraph
07-05-2008, 05:13 AM
I used to make layouts using tables and iframes and everyone thought i used divs because it looked like i did. And the tables was just an idea if nothing else worked out.
Sorry for bringing a rather 'old' topic up..
But anyhow, Tables are meant only to contain information, not to be used for design.
As Selena said they make your site load slower, and they're not cross-browser compatible.. For instance: if you have made your layout with tables and someone with a text-browser would view your site, your sidebar & content would be all over the place.
Also, browsers for people with a visual impairment would be struggling with the same problem as I stated above.
This really isn't recommended as you are supposed to tend to your visitors - no tables for layouts :p
lifeless
07-09-2008, 08:15 PM
Use this in your stylesheet
background-image: url('bg image url here');
background-repeat: repeat-y;
On mis-placed.org, the top header logo thing is separate to the background;
http://mis-placed.org/layout/top.png
So the part that fits across the screen is like an extended background but its vertical instead.
vBulletin® v3.7.3, Copyright ©2000-2008, Jelsoft Enterprises Ltd.