?
Solved

need a floating title

Posted on 2006-11-24
9
Medium Priority
?
205 Views
Last Modified: 2010-04-09
I need a title that wil always be in the same place (the top) regardless of whether the user has scrolled don to the bottom of the page.

Can someone tell me how to do this?



newbieweb
0
Comment
Question by:newbieweb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 4
9 Comments
 
LVL 10

Accepted Solution

by:
ADSLMark earned 2000 total points
ID: 18010600
You can use frames... and otherwise you need CSS.

--HTML--
<frameset rows="100, *">
<frame src="titlepage.html" />
<frame src="index.html" />
</frameset>

--CSS--
<head>
<style type="text/css">
div.content
{
  height: 100%;
  overflow: auto;
}
div.title
{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}
body
{
  overflow-y: hidden;
}
</style>
</head>
<body>
<div class="title"></div>
<div class="content"></div>
</body>

Good luck.
Mark
0
 

Author Comment

by:newbieweb
ID: 18011317
Mark,

Which parts go in the style sheet and which parts go in the HTML page?

My compiler didn't recognize: overflow-y: hidden;

"overflow-y" is not a known CSS property name.

newbieweb
0
 
LVL 10

Expert Comment

by:ADSLMark
ID: 18011334
div.content
{
  height: 100%;
  overflow: auto;
}
div.title
{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

goes into the css file and

<div class="title"></div>
<div class="content"></div>

in the html file.

Mark
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 

Author Comment

by:newbieweb
ID: 18017211
Mark,

I put the word "Glossary" into both the title and the content.  And in both cases the text scrolls with the window.

I need it to stay put, even when I scroll the window.

Any suggestions?

newbieweb
0
 
LVL 10

Expert Comment

by:ADSLMark
ID: 18017342
What browser?

Mark
0
 

Author Comment

by:newbieweb
ID: 18017359
IE 6
0
 
LVL 10

Expert Comment

by:ADSLMark
ID: 18017398
I tried it, using IE6, it works in my opinion. Take a look:

<html>
<head>
<style>
div.content
{
  height: 100%;
  overflow: auto;
}
div.title
{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}
</style>
</head>

<body>
<div class="title">Glossary (this one should stay on top)</div>
<div class="content">
Glossary<br/><br/><br/><br/><br/><br/><br/>Glossary<br/><br/><br/><br/><br/><br/><br/>Glossary<br/><br/><br/><br/><br/><br/><br/>Glossary<br/><br/><br/><br/><br/><br/><br/>Glossary<br/><br/><br/><br/><br/><br/><br/>Glossary<br/><br/><br/><br/><br/><br/><br/>Glossary<br/><br/><br/><br/><br/><br/><br/>Glossary<br/><br/><br/><br/><br/><br/><br/>Glossary<br/><br/><br/><br/><br/><br/><br/>Glossary<br/><br/><br/><br/><br/><br/><br/>
</div>
</body>
</html>

Mark
0
 
LVL 10

Expert Comment

by:ADSLMark
ID: 18017403
Using external stylesheet:

==test.html==
<html>
<head>
<link rel="stylesheet" href="mystyle.css" type="text/css" />
</head>

<body>
<div class="title">Glossary (this one should stay on top)</div>
<div class="content">
Glossary
<br/><br/><br/><br/><br/><br/><br/>
Glossary
<br/><br/><br/><br/><br/><br/><br/>
Glossary
<br/><br/><br/><br/><br/><br/><br/>
Glossary
<br/><br/><br/><br/><br/><br/><br/>
Glossary
<br/><br/><br/><br/><br/><br/><br/>
Glossary
<br/><br/><br/><br/><br/><br/><br/>
Glossary
<br/><br/><br/><br/><br/><br/><br/>
Glossary
<br/><br/><br/><br/><br/><br/><br/>
Glossary
<br/><br/><br/><br/><br/><br/><br/>
Glossary
<br/><br/><br/><br/><br/><br/><br/>
</div>
</body>
</html>

==mystyle.css==
div.content
{
  height: 100%;
  overflow: auto;
}
div.title
{
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
}

Mark
0
 

Author Comment

by:newbieweb
ID: 18017407
Mark,

Yes it sure does work. I must have done something wrong when I integrated it.

Thanks.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses how to create an extensible mechanism for linked drop downs.
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question