473,397 Members | 1,972 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,397 software developers and data experts.

Scrolling Within Divs/a Div

So I'm creating a website, a blog actually, and I'm making it using an image based layout (i.e. a background) and placing content within divs. The site uses Cutenews.

I've made my background and implemented it in my page. I've created my two divs that I need and they work perfectly, except for one little problem. The box on the layout image where the second div lies is a certain size, but the content that goes in that div is too big for the box.

What happens is that the content breaks out of the div an ends up running down the whole page. What I'd like to have happen is for a scroll bar to automagically appear, when need be, and scroll up and down through content in that one div.

Here is an example of what I'm talking about, and here is the page I'm working on.
Jun 9 '07 #1
2 1836
To make things easier, this is the code for the div in question, and the div proceeding it:
Expand|Select|Wrap|Line Numbers
  1. <div style="position: absolute; left: 102px; top: 67px; width: 604px; height: 83px; background-color: rgb(0, 0, 0); color: #FFFFFF; overflow: auto;">This is the masthead
I have tried including the styling and formatting inside the div tag rather than up in the style section, didn't work. I have tried it without the div- container-thing (if you know what I'm getting at).

Can anybody shed some light on what's going on and help me fix it?
Jun 9 '07 #2
Okay. Scratch all of the above. I got things working how I needed them to work, except for one issue.

The content fits in the div nicely and the vertical scrolling works as needed, but the content is still too big horizontally, and I really would rather that it wasn't allowed to overflow horizontally.

Expand|Select|Wrap|Line Numbers
  1. <!--Begin Content-->
  2.     <div
  3.      style="position: absolute; left: 350px; top: 100px; width: 315px; height: 300px; overflow: scroll;">
  4.  
  5.             <?PHP
  6.             $number=5;
  7.             include("cutenews/show_news.php");
  8.             ?>
  9.  
  10.     </div>
  11. <!--End Content-->
The page is now at: http://tony.celoria.net/utb.php.
Are there any cross-browser fixes for this?
Jun 9 '07 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Kai Grossjohann | last post by:
I'm trying to synchronize the scrolling of two <div> elements. The top element is for showing column headers, the bottom div shows the table rows. I consed up the following HTML/JavaScript...
7
by: Pete | last post by:
I'm working (playing) on a mouse following script. Yes, the sort no one likes but I'm having great fun tinkering with it - sad. Anyway, if there's enough page content to cause scrolling and I...
0
by: nina | last post by:
Hi all, I've been working on a site that involves content in multiple scrolling DIVs on a page which is loaded inside multiple framesets. the layout is cramped as all hell but I'm not going to...
13
by: al jones | last post by:
I guess one question at a time will work better. URL http://aljones.us (yes, I'm back again) I'd like to cause this whole page to fill the viewable window if I can. Meaning that I'd like the...
7
by: seven.reeds | last post by:
Hi, I have a caontainer div that is 80% of the width of my display and 40em high. It will hold from 2 to 10 columns of data and will almost always have more than 40ems of lines... so it will...
0
by: stan | last post by:
I have internal links/jumps within divs. The divs have vertical scrolling. When a link is clicked, both the space within the div as well as the entire page vertically scroll. I would like to...
0
by: eelziere | last post by:
Hi All, I found the http://www.thescripts.com/forum/thread644980.html discussion, but none of the proposed solutions worked for me. Thanks in advance for your help! * The site:...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
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...

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.