HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
Prevent one line of text from scrolling in a text box?
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form
View previous topic :: View next topic  
Author Message
LaughtersMelody



Joined: 25 Mar 2008
Posts: 8
Location: Rocky Mtn. region of the US

PostPosted: Tue May 13, 2008 10:14 pm     Prevent one line of text from scrolling in a text box? Reply with quote

I know there is a way to anchor an imagine so that it doesn't move, but the rest of the page can be moved by using the scroll bar. Is there a way to do the same to text? I have a text box that I plan to use as a way to report updates to the site. I thought of writing the label (What's New) outside the text box, but I liked the look much better when I included it inside the box. The only problem I'm running into is that the "What's New" scrolls with the rest of the text, and isn't visible once you scroll down. If it is possible, I would like to have the "What's New" stay in sight, while the rest of the text scrolls under it.

I've looked just about everywhere I can think of, but I haven't been able to find anything close to that effect. Can it be done, and if so, what is the code? I would appreciate any help you can give me. Smile Thank you very much in advance.

-Laughter
Straystudio



Joined: 14 Apr 2008
Posts: 228
Location: Nord Italy

PostPosted: Tue May 13, 2008 11:13 pm     Reply with quote

write it inside a DIV styled as position: fixed; or absolute.
Code:

<div style="position: fixed; width: ; height: ; left: ; top: ;">

Your text

</div>



Values in pixel.
absolute scrolls along with the page, if sizes request to scroll.
fixed always display in the window field.

Also both left: ; and right: ; together work, without width: ;
Same for top with bottom
LaughtersMelody



Joined: 25 Mar 2008
Posts: 8
Location: Rocky Mtn. region of the US

PostPosted: Tue May 13, 2008 11:26 pm     Reply with quote

Do you mean that the left: ; and right: ; commands work without using the width: ; command?

What information would I need in the code for left: ; and top: ;?

Thank you again for your help. Smile

-Laughter
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> HTML Form All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial