By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,320 Members | 2,212 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,320 IT Pros & Developers. It's quick & easy.

fixed images and layers advice please

P: n/a
Hi,

Is it possible to simulate frames behaviour with CSS?

Currently, I've used CSS to create the visual look of my old framed
site.
For this I've used styles that place the images at absolute positions.

Then I thought, if I fixed the image positions, the images will stay
put and the 'body' will scroll up, like in frames.

This too worked, except the 'body' content scrolled over the fixed
images.

The 'body' position is also set with a CSS absolute position.

Can I assign layers to the images and 'body' styles so that the 'body'
is beneath the images when it scrolls up?

Note part of the 'frame' at the top is set up with a repeat-x
background tile.

Below are the stylesheet snippets in question:
body {
color: #000000;
background-color: #ffffff;
margin-top: 0px;
margin-left: 0px;
margin-right: 0px;
background: white url("images/index_topstrip.gif");
background-repeat: repeat-x;
background-position: top; <--not yet fixed position of this one
}

..style0 <--this one for the "body"
{
position: absolute;
top: 145px;
left: 160px
}

..style10 <--these ones onward for the fixed images
{
position: fixed;
top: 2px;
left: 0px
}

..style11
{
position: fixed;
top: 80px;
left: 0px
}

..style12
{
position: fixed;
top: 132px;
left: 0px
}
etc etc

Jul 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Els
hq******@hotmail.com wrote:
Hi,

Is it possible to simulate frames behaviour with CSS?

Currently, I've used CSS to create the visual look of my old framed
site.
For this I've used styles that place the images at absolute positions.

Then I thought, if I fixed the image positions, the images will stay
put and the 'body' will scroll up,
yes.
like in frames.
no :-)
This too worked, except the 'body' content scrolled over the fixed
images.
of course ;-)
The 'body' position is also set with a CSS absolute position.

Can I assign layers to the images and 'body' styles so that the 'body'
is beneath the images when it scrolls up?
I'm guessing you are talking a "top frame" which stays visible all the
time while the "main frame" is a scrollable area?
Note part of the 'frame' at the top is set up with a repeat-x
background tile.
[snip stylesheet snippets]
etc etc


1) please provide a URL so we can see what you're talking about
2) reconsider the simulation of frames - why would you want the top
'frame' to stay put? Let it scroll up with the rest of the page, like
all normal* pages do? If a chunk of 'top frame' is to stay visible at
all times, it will also at all times eat up space in my window, that I
might want (need even!) to display the actual content of your page.

* overgeneralised, I know.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vo. O resto imperfeito.
- Renato Russo -
Jul 21 '05 #2

P: n/a
hq******@hotmail.com wrote:
Hi,

Is it possible to simulate frames behaviour with CSS?

Frameless Frames, the simulation of Frames behaviour with CSS.
http://www.ddj.com/documents/s=2988/nam1012434075/
by Eric Meyer is from early 1998, but explains clearly and easily.
Here is an example:
http://www.info.com.ph/~etan/w3panth...esnebulae.html
You can find others if you look for them.

--
Gus
Jul 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.