473,890 Members | 1,355 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Scrolling text in a DIV

Yes I have searched the group in google.
No, I did not find the answer.

I want a DIV that will contain variable amounts of text. It will
have a fixed width and I want to limit the height to the viewport
height. If there is more text than the DIV height, I want the
excess clipped and a scrollbar to appear.

I am sure that this is a relatively simple task, I just don't
know enough about CSS positioning to know where to look first.

I am not asking for code, just tell me where to start looking.

Thanks,

bill
Jul 21 '07 #1
4 9508
Rik
On Sat, 21 Jul 2007 16:50:01 +0200, bill <no****@spamcop .netwrote:
Yes I have searched the group in google.
No, I did not find the answer.

I want a DIV that will contain variable amounts of text. It will have a
fixed width and I want to limit the height to the viewport height. If
there is more text than the DIV height, I want the excess clipped and a
scrollbar to appear.

I am sure that this is a relatively simple task, I just don't know
enough about CSS positioning to know where to look first.

I am not asking for code, just tell me where to start looking.

max-height
overflow
--
Rik Wasmus
Jul 21 '07 #2
bill wrote:
Yes I have searched the group in google.
No, I did not find the answer.

I want a DIV that will contain variable amounts of text. It will have a
fixed width and I want to limit the height to the viewport height. If
there is more text than the DIV height, I want the excess clipped and a
scrollbar to appear.

I am sure that this is a relatively simple task, I just don't know
enough about CSS positioning to know where to look first.

I am not asking for code, just tell me where to start looking.
<http://meyerweb.com/eric/css/edge/complexspiral/demo.html>

--
Gus
Jul 21 '07 #3
I want a DIV that will contain variable amounts of text. It will have a
fixed width and I want to limit the height to the viewport height. If
there is more text than the DIV height, I want the excess clipped and a
scrollbar to appear.
Take a look at the overflow property:
http://www.w3schools.com/css/pr_pos_overflow.asp
http://www.w3schools.com/css/tryit.a...rycss_overflow
Jul 21 '07 #4
William Gill wrote:
>I want a DIV that will contain variable amounts of text. It will have
a fixed width and I want to limit the height to the viewport height.
If there is more text than the DIV height, I want the excess clipped
and a scrollbar to appear.

Take a look at the overflow property:
http://www.w3schools.com/css/pr_pos_overflow.asp
http://www.w3schools.com/css/tryit.a...rycss_overflow
THank you much - all

bill
Jul 21 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
16696
by: Midas NDT Sales | last post by:
I have been looking at a simple example of a scrolling text box (the one in the SAM book) as below: <script language="JavaScript"> var pos=100; function Scroll() { if (!document.getElementById) return; obj=document.getElementById("thetext"); pos -=1; if (pos < 0-obj.offsetHeight+130) return;
44
919
by: Jim M | last post by:
I have had great success with using <iframe> with overflow-y set to auto. I can get a similar look with the <iframe> tag. BUT... In all cases I need to have fixed heights. Is there a way to put either tag inside an HTML <TD> and have the same kind of scrolling effect. This would allow me to fill the screen and have the size of the scrolling box change on resize. Thanks in advance.
1
3616
by: Wesman | last post by:
Threads, textboxes and scrolling Thanks in advance for any information on this matter. I have run into a small richtextbox, scrolling and tread issue. Which has me totally confused. Instead of trying to explain it I wrote some small C# code to demonstrate the fact that in the threaded version the textbox simple doesn't scroll like it should… please look to the startButton_Click method for the distinction between the two programs..
5
21705
by: Will Gillen | last post by:
I need to have a "scrolling" text label or textbox at the bottom of my window to show the URL of where a song is being played from. I want the text to scroll on a single line from left to right in case the URL is longer than the width of the textbox/text label. Is there a native way to do this in VB.NET?
2
2987
by: P2P | last post by:
Hi I am wondering if someone know of a free cross-browsers vertical scrolling script that - is cross cross-browsers - will call the scrolling content from an external html page or from a url page
4
7826
by: Keith Bentrup | last post by:
Hi all, I wrote a simple search function to find text in a textarea where not all the text is visible (ie. the text box displays 10 lines but there may be more than 1000 lines to search). I can find the text and select it using the function below, BUT I can't figure out how to have the textarea automatically scroll to the selection in Firefox. Any ideas or suggestions? function search(needle,haystack,start) { var element =...
5
4273
by: PythonistL | last post by:
I am a newbie with Javascript. I have this simple script for scrolling text <HTML> <HEAD> <TITLE>Scrolling Message Script</TITLE> <SCRIPT language="JavaScript"><!-- var msg = 'My scrolling text.. ' function scrollMsg(){
1
2488
by: Thorsten Kleinweber | last post by:
Hello, I did some first steps in programming a site for a friend and have some questions concerning web design. The site is http://www.stevanez-juls.de: 1. On my tft display (with low brightness adjustment) the site is correctly bright but on some other monitors it's very dark, does somebody know why? 2. Does somebody know why scrolling the white text on black background is deforming the text? If I change the background to a brighter...
3
11761
by: Chamnap | last post by:
Hello everybody, I have one problem. I want to do something after the user finished scrolling. The scroll event fires whenever the user is scrolling. I don't want this actually. Does anyone has any idea or trick of how to achieve this? Appreciate your ideas..... Thanks Chamnap
0
9819
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
11222
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10811
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10461
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
8015
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5846
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6041
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
4270
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
3275
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.