Hello,
After a bit of personal debate, I’ve decided to redo my site design (again..)
I know I committed somewhat of a web designer’s sin with my first attempt by using absolute positioning. The overall idea was to have a header, left and right sidebars, and a footer that stayed in place while the content itself was the only thing to scroll.
That worked out pretty well for IE7 and FireFox (I’m not touching IE6 hacks until I finalize a design I like.) That demonstration page is [URL=”http://www.darkscythe.com/DoTtest.html”]here.
That has a severe limitation though, the side bars are a fixed height dependent on the user’s resolution (I’m designing to be viewable at 1024×768 and up.) That was fine for my old blog, but with my new design and content, I felt that was too limiting a factor (despite my reservations about doing “what everyone else is doing.”) and decided to allow it to scroll along with the content, and getting rid of the footer at the same time.
I’ve managed to redesign the layout without absolute positioning, and floating the 2 sidebars left and right. It took me a bit of trial and error to figure out that float:right; had to come BEFORE my non-floated center column.
My final problem: I need to make the sidebars and content scroll. I’ve put them in their own container div for a reason: I do not want the header to scroll with the rest of the page. Similar to how only the content moves in the first link, I wish to expand the scrollbar to include the 2 sidebars now, but leaving the header alone. I can’t seem to figure out how to do that though..
If anyone can help me out here I’d appreciate it. I’d also like some feedback on the two designs, if it’s not too harsh lol.
Demonstration page of second attempt is [URL=”http://www.darkscythe.com/DoTtest2.html”]here.
This is the one I need help with, currently.
Thanks in advance!
[CODE]#container {
margin: auto;
width: auto;
text-align: left;
[COLOR="Red"] overflow-y: auto;[/COLOR]
z-index: 1;
}[/CODE]
[CODE]#container {
margin: auto;
width: auto;
text-align: left;
[COLOR="Red"] overflow: auto;[/COLOR]
z-index: 1;
}[/CODE]
Oops, sorry for the late reply - I fell asleep last ngiht, lol. >_<
To answer your questions:[/QUOTE]
Yes, the entire content including header will be 960px wide and centered. I could've put everything into one container div, but I figured separating them would be the easiest way to prevent the header from scrolling.[/QUOTE]
As for the percentage height, no - what I'd optimally like is for the div to stretch all the way to the bottom of the browser (In absolutely positioned terms, it would be top: 125px; bottom: 0px? but I don't know if there's a way to do this without using absolute positioning.[/QUOTE]
Your final link is almost what I need, although there are a few things:
Although it's subtle, the content isn't properly centered, I'm not sure if it's the result of the scrollbar or not, but everything is pushed a few pixels to the left. Properly centered, it should fit perfectly under the header since both are 960px wide.[/QUOTE]
The bigger problem though, is the container div does not stretch all the way to the bottom. You've set it to 70%, and I'm running 1280x1024 resolution myself, but it ends short of the bottom of the screen by some fair distance. I had this issue before as well, when I tried to assign it an explicit height, but fell short of the browser.
Here's a quick pair of screenshots to show what I'm seeing.
http://darkscythe.com/images/ie7layout.jpg
http://darkscythe.com/images/firefox2layout.jpg [/QUOTE]
As far as IE6 goes, yes I know IE6 will be heavily broken for numerous reasons. I was going to try to fix it as each issue cropped up, but it was just taking too long and preventing me from finishing my layout, so I decided to finish it first, then work on hacking it apart for IE6. It will be on its on stylesheet anyway, so I didn't need any hacks cluttering up my main stylesheet. I know IE6 doesn't support PNG transparency, but I've already created a set of GIFs for use when I made the PNGs. I'll simply use IE's alpha opacity rule to achieve the desired effect if I need to.[/QUOTE]
Edit:
I just noticed you added a bunch of comments to the code - sorry for not commenting them enough lol, it was mainly just there for personal reference, so it was probably a huge mess to sort through.[/QUOTE]
#container {
position: absolute;
top: 125px;
left: 16px;
bottom: 0px;
right: 0px;
margin: auto;
width: auto;
text-align: left;
overflow: auto;
z-index: 1;
}
Unfortunately, I don't know why, but this makes the footer at the bottom have a small space after it ends and before the bottom of the browser window.[/QUOTE]
[CODE]margin:0;
padding:0;[/CODE]
And of course, the downside is this uses absolute positioning, which I see being denounced in the web development community.[/QUOTE]
Are the scrollbars always 16px wide? [/QUOTE]
[CODE]#container {
position: absolute;
top: 125px;
left: 16px;
right: 0px;
bottom: 0px;
margin: auto;
width: auto;
text-align: left;
overflow-y: scroll;
overflow-x: hidden;
z-index: 1;
}[/CODE]
[CODE]
margin:0 auto;[/CODE]
/* CSS Document */
* {
margin: 0px;
padding: 0px;
}
* html {
padding: 0px;
overflow: hidden;
}
* html body {
padding: 0px;
padding: 0px;
}
body {
margin: 0px;
}
html,body {
margin: 0px;
padding: 0px;
overflow: hidden;
}
* html #textbox {
position: relative;
height: 100%;
top: 125px;
left: 160px;
bottom: 50px;
width: 640px;
display: block;
overflow-y: auto;
overflow-x: hidden;
z-index: 1;
}
* html #kuraibox {
position: absolute;
display: block;
top: 0px;
left: 0px;
height: 100%;
overflow: hidden;
width: 624px;
z-index: 2;
}
* html #footer {
bottom: 0px;
}
As far as the lists go, add about 1em left padding to the <ul> - this will bring the bullets back in as they are normally positioned outside the <li>.
BTW, I do prefer version 2 - you can use the mouse scrollwheel without having to have the mouse pointer over the content.[/QUOTE]
There are also a lot of gaps between the images that make up the borders for some reason.[/QUOTE]
[CODE].entrybox .datefield, .entrybox .bl {
margin-right: -3px;
}
.entrybox .tr, .entrybox .commentfield {
margin-left: -3px;
}[/CODE]
As for that last thing about the mousewheel - what do you mean? [/QUOTE]
[CODE]ul ul, ol ul {
padding-left: 5px;
}
ul ol {
padding-left: 12px;
}[/CODE]
0.1.9 — BETA 5.19