[HTML/CSS] making a div be "attached"

A place to discuss the implementation and style of computer programs.

Moderators: phlip, Moderators General, Prelates

User avatar
Earlz
Gets Obvious Implications
Posts: 785
Joined: Sat Jun 09, 2007 8:38 am UTC
Location: USA
Contact:

[HTML/CSS] making a div be "attached"

Postby Earlz » Sat Sep 08, 2007 8:10 pm UTC

Ok, I am working on a redesign of my website, and I got all the sweet and nifty PHP script done so that I can do basically anything I want on any page, but now I need to work more on the layout and look of it
the url currently is http://earlz.biz.tm/new_site/

I know I'm probably going to change the background picture, but one for sure thing I want is I want the navigation to kindof float, so that when I scroll down, the navigation stays in the side so that it's not just wasted space...

is this possible?
My new blag(WIP, so yes it's still ugly..)
DEFIANCE!
Image
This is microtext. Zooming in digitally makes it worse. Get a magnifying glass.. works only on LCD

User avatar
Earlz
Gets Obvious Implications
Posts: 785
Joined: Sat Jun 09, 2007 8:38 am UTC
Location: USA
Contact:

Postby Earlz » Sat Sep 08, 2007 9:38 pm UTC

fixed...

I used position: fixed;
My new blag(WIP, so yes it's still ugly..)
DEFIANCE!
Image
This is microtext. Zooming in digitally makes it worse. Get a magnifying glass.. works only on LCD

ToLazyToThink
Posts: 83
Joined: Thu Jun 14, 2007 1:08 am UTC

Postby ToLazyToThink » Sun Sep 09, 2007 4:55 am UTC

Earlz wrote:fixed...

I used position: fixed;


Note that that wont work with IE. If you care, there are hacks you can use to fake position fixed with IE.

I don't have the links handy, but google knows all.

User avatar
Nexuapex
Posts: 22
Joined: Thu Sep 06, 2007 3:01 am UTC
Location: Northwest Iowa
Contact:

Postby Nexuapex » Sun Sep 09, 2007 12:22 pm UTC

ToLazyToThink wrote:Note that that wont work with IE. If you care, there are hacks you can use to fake position fixed with IE.

I don't have the links handy, but google knows all.

I believe it works in IE 7, but not IE 6.
“It’s my estimation that every man ever got a statue made of him was one kind of a son of a bitch or another.”

User avatar
Jach
Posts: 167
Joined: Sat May 05, 2007 8:38 pm UTC
Contact:

Postby Jach » Mon Sep 10, 2007 1:55 am UTC

The hack I've used for a CSS Frame is something like this:
html {overflow: hidden; height: 100%;}
body {height: 100%; overflow: auto; margin: 0 0 0 25%;}
div.navi {position: absolute; top: 0px; left: 0px; height: 100%;}

Thanks for sharing the position:fixed though, if I make a site that I don't care if older browsers can't see properly I'll probably use it.
I love reading quotes.


Return to “Coding”

Who is online

Users browsing this forum: No registered users and 3 guests