Possible to create a frames effect in an HTML page without using frames?
GeneralThis forum is for non-technical general discussion which can include both Linux and non-Linux topics. Have fun!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Possible to create a frames effect in an HTML page without using frames?
I didn't know which section to post this under since it's not exclusive to Linux so here goes:
I'm wanting to "freeze" the left hand side of an html page without using frames, while allowing the right hand side to scroll freely. I hear this is possible with CSS but I'm a dummy when it comes to html/css.
If anyone has any code which does exactly what I'm looking for either css/html PLEASE post it here. Thanks for reading.
Hi secesh, thanks again for your very quick reply!
The design on the link you mentioned doesn't "freeze" the left hand side like frames allow. I'll try to describe what I'm looking for. You see the link in my sig? That's my little website. I want to "freeze" the photo on each page to be on the left hand side and not move, while allowing the right hand side of the page (with the Links to other websites) to scroll freely with the left hand side of the page with the photo staying in place the entire time and not scrolling.
...hmm... given that you only want an image to not move, why not use that as a non-repeating bg image with css 'fixed' option for the body... then set a table with dead cell of image width to structure the text around it....
If you want to have a scrolling part and a freezed part, then you have to use div tags. One will have style position:absolute, and the other will have position:fixed. Example:
Code:
<html><head>
<title>no-frames example</title>
<style type="text/css"><!--
div.noscroll {
position: fixed;
top: 0;
left: 0;
width: 300px;
}
div.scroll {
position: absolute;
top: 0;
left: 300px;
}
--></style>
</head><body>
<div class="noscroll">
<h1>Menu</h1>
<ul>
<li>item1...</li>
<li>and so on...</li>
</ul>
</div>
<div class="scroll">
<p>This is the story of...
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
a paragraph that should be scrolling...
<br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>
else you're using a too old browser.</p>
</div>
</body></html>
If that's not enough, and you want to update part of the page, you'll have to learn XMLHTTP.
Thank you for all the very helpful responses, I appreciate it. Thanks secesh and theYinYeti for including some code for examples, very nice. Yes, this issue has been solved, thanks to the replies. Thanks again to all of the people who took the time to post.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.