» Site Navigation
1 members and 575 guests
Most users ever online was 47,180, 07-16-2025 at 05:30 PM.
» Today's Birthdays
» Stats
Members: 75,899
Threads: 249,095
Posts: 2,572,066
Top Poster: JLC (31,651)
|
-
Help from the CSS savvy?
We have a lot of very clever and web savvy members, so I take advantage. Here is my problem.
I want to make both the menu and the quote on each page of Blue Gorgon remain stationary when you scroll, so you can always see them alongside the long center as you read. This way, it looks nice and people don't have to scroll back up to use the menu. I've been working on this, and I can make the menu stay... but then the quote box vanishes or does weird things. I've been pretty much learning CSS as I go with BG, and am apparently not savvy enough to solve this problem with google-fu alone.
If I use {position:absolute;} or {position:fixed;} on the menu, the center column scoots left underneath it. If I{ float: center;} the center column, everything looks right *except* that the quote box, the third column, goes awol. So even if I try to use fixed or absolute on the third column, who will know? It vanishes or goes crazy! If I float it left, it hovers in the same spot as the menu, and any other float it's gone. It's frustrating because the menu flows so beautifully, but the quote column... argh.
Anybody know how I can get both the first column -the menu- and the third column -the quote- to remain fixed on my site while keeping the 3 column layout smooth and symmetrical?
~Sheree~
Because Snakes are Beautiful!
http://www.bluegorgon.com/
4.1 snakes so far (Gomez, Falkor, Ma-tsu, Neptune, Irwin)
2.1 house rabbits (Daphne, Bowie, Unut)
0.1 Jeweled Lacerta (Dana)
In loving memory of Cleo
1989-2007
-
-
Re: Help from the CSS savvy?
-
-
BPnet Veteran
Re: Help from the CSS savvy?
The fixed will work fine, but not in all browsers... to pull it off, you need to do the following:
1) Move the col3 div above the col2 div. The divs that are fixed need to be in the DOM before the scrolling one, otherwise they'll disappear (technically, they're there, but not visible due to being off the page)
2) Set the locations of the boxes in css, using the left attribute to define the location of the quote box like so:
#col1
{
position: fixed;
width: 20%;
background-color: #99CCFF;filter:alpha(opacity=75);opacity:.75;
margin-left: 3%;
border-color: green;
border-style: outset;
border-width: 4px;
display: block;
}
#col3
{
left: 76%;
position: fixed;
width: 20%;
background-color: #99CCFF;filter:alpha(opacity=75);opacity:.75;
border-color: green;
border-style: outset;
border-width: 4px;
display: block;
}
#col2
{
top: 0;
width: 48%;
margin: auto;
background-color: #99CCFF;filter:alpha(opacity=95);opacity:.95;
border-color: green;
border-style: outset;
border-width: 4px;
}
The Earth is the cradle of mankind, but one cannot live in the cradle forever. -Konstantin Tsiolkovsky

-
-
Re: Help from the CSS savvy?
Hmm, that makes sense but still having the same problem... The absolute tag is supposed to be the IE version of fixed, but that doesn't seem to be working at all tonight so who knows. I'm using the contact page as a test for it.
http://www.bluegorgon.com/contact.htm
I may resort to Java if I can't get the CSS version to work, but I think it flows a lot smoother in CSS. Less jerky and abrupt. If it just wouldn't eat the other box, I'd be all set!
Thanks again, this is making me a bit crazy!
~Sheree~
Because Snakes are Beautiful!
http://www.bluegorgon.com/
4.1 snakes so far (Gomez, Falkor, Ma-tsu, Neptune, Irwin)
2.1 house rabbits (Daphne, Bowie, Unut)
0.1 Jeweled Lacerta (Dana)
In loving memory of Cleo
1989-2007
-
-
BPnet Veteran
Re: Help from the CSS savvy?
 Originally Posted by MedusasOwl
Hmm, that makes sense but still having the same problem...
The quote column disappearing is because you've got it under the center column. In the HTML (not the style definition), literally move the entire col3 div just above the col2 div, and it will show up.
 Originally Posted by MedusasOwl
The absolute tag is supposed to be the IE version of fixed, but that doesn't seem to be working at all
No, the position: absolute is a completely different thing than position: fixed, it's just that pre-IE7, position: fixed was not supported by IE (even though it was in the CSS standard when IE4 was released -- just another example of MS not getting it right).
That said, it can be made to work like position: fixed, but you have to do a few things.
1) Add the following line just above your <HTML> tag to put IE < 7 into *LOL* "standards compliance mode" (note: this should ALWAYS be on EVERY page you make to be valid HTML anyway).
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
2) Add the following to your style definitions (this creates a canvas to absolute position on, and the margin is to keep from having a second set of scroll bars for the div)
html, body {
height: 100%;
overflow: auto;
margin: 0px;
}
3) Update the style for cols 1 & 3 as follows (modified the positioning properties, as well as changing the margin-left to a literal left in col1):
#col1 {
position: absolute;
width: 20%;
background-color: #99CCFF;filter:alpha(opacity=75);opacity:.75;
left: 3%;
border-color: green;
border-style: outset;
border-width: 4px;
display: block;
}
#col3 {
left: 76%;
position: absolute;
width: 20%;
background-color: #99CCFF;filter:alpha(opacity=75);opacity:.75;
border-color: green;
border-style: outset;
border-width: 4px;
display: block;
}
The Earth is the cradle of mankind, but one cannot live in the cradle forever. -Konstantin Tsiolkovsky

-
-
Re: Help from the CSS savvy?
OH, ok, I misunderstood what to move, there it is! Puts quite a gap above col 2 but worth the nice smooth fixed side boxes. Very nice, thank you!
~Sheree~
Because Snakes are Beautiful!
http://www.bluegorgon.com/
4.1 snakes so far (Gomez, Falkor, Ma-tsu, Neptune, Irwin)
2.1 house rabbits (Daphne, Bowie, Unut)
0.1 Jeweled Lacerta (Dana)
In loving memory of Cleo
1989-2007
-
-
BPnet Veteran
Re: Help from the CSS savvy?
 Originally Posted by MedusasOwl
OH, ok, I misunderstood what to move, there it is!  Puts quite a gap above col 2 but worth the nice smooth fixed side boxes. Very nice, thank you! 
The gap above col2 is because of the extra markup at the end of the line that has col3 on it. Look for the following:
Thomas Berger <br></p></div></center><br><p></p>
and delete the <br><p></p> so it just reads
Thomas Berger <br></p></div></center>
and your gap will disappear.
Also, make sure you add the doctype and the "html, body" style tags, and change all the positions from "fixed" to "absolute" so the fixed menus will work in IE < 7
The Earth is the cradle of mankind, but one cannot live in the cradle forever. -Konstantin Tsiolkovsky

-
-
Re: Help from the CSS savvy?
There we go, I was fixing the other pages and noticing that they were even when just the contact one wasn't. It's always some little detail I miss. Thank you again! I got it now.
~Sheree~
Because Snakes are Beautiful!
http://www.bluegorgon.com/
4.1 snakes so far (Gomez, Falkor, Ma-tsu, Neptune, Irwin)
2.1 house rabbits (Daphne, Bowie, Unut)
0.1 Jeweled Lacerta (Dana)
In loving memory of Cleo
1989-2007
-
-
-
-
Re: Help from the CSS savvy?
It IS crazy, I've been getting the hang of it but still... yeash. The code doesn't like a java graphic on my index, but I'll just change out the graphic, been meaning to do that anyway.
Sometimes now though when I click on a link after scrolling, the menu box vanishes and I need to reload. Is that a typo issue on my part, or just a glitch that will happen?
~Sheree~
Because Snakes are Beautiful!
http://www.bluegorgon.com/
4.1 snakes so far (Gomez, Falkor, Ma-tsu, Neptune, Irwin)
2.1 house rabbits (Daphne, Bowie, Unut)
0.1 Jeweled Lacerta (Dana)
In loving memory of Cleo
1989-2007
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|