PDA

View Full Version : text scrolling window


offtheroad
05-09-2008, 03:45 PM
I need help building a text scrolling window and inserting it into a large table cell. Here is my simple code for a 2 page site. Where do i insert the code for a text scrolling box?
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Untitled Document</title>
<style type="text/css">
<!--
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->
</style></head>

<body>
<table width="772" border="0" cellpadding="0" cellspacing="0">
<tr>
<td width="772"><img src="../images/image.jpg" alt="image" width="770" height="990" longdesc="http://index.html" /></td>
</tr>
</table>
</body>
</html>
jbechdel@comcast.net

Death Dream
05-09-2008, 04:59 PM
I see a young me in you lol.


<div overflow: scroll;">
</div>

Just put that in your cell you want to scroll.

~Death Dream~

domedia
05-09-2008, 08:55 PM
There is not attribute 'scroll' in HTML ;)
You have to use CSS:
<div style="width: 200px; height: 200px; overflow: auto;">Your content</div>
The scrollbars will automatically appear once the content is too large for the DIV box. Set the width and height to whatever you want it to be.

offtheroad
05-09-2008, 10:04 PM
Thank You, I couldn't figure out why I didn't see the scrollbars. But I still have the problem of it not showing up inside my table cell in my graphic.

Rob_Che
05-10-2008, 10:01 AM
Do you have enough content for it to need to scroll ?
You won't see anything unless the div needs to scroll...

Can you post your code ?

Rob_Che
05-10-2008, 05:08 PM
Ok, so offtheroad posted the code straight to my Private Message box... That's OK but we all want to see the results, yes?

The code you posted offtheroad, (no offence) but I couldn't really make sense of it, it was just a really big image in a table... There was no room for a text box... then something about maps outside of the table... no idea.

So here we go...

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>Scrolling Div</title>
<style type="text/css"></style>
</head>

<body>

<div style="width: 400px; height: 200px; overflow: auto;">
<p>Content Here</p>
<br>
<p>Content Here</p>
<br>
<p>Content Here</p>
<br>
<p>Content Here</p>
<br>
<p>Content Here</p>
<br>
<p>Content Here</p>
<br>
</div>

</body>
</html>


Post this into DW - might give you a start.

Rob

Rob_Che
05-10-2008, 05:10 PM
Not tidy code, QUICK code :wink:

offtheroad
05-10-2008, 05:33 PM
thanks again

offtheroad
05-10-2008, 05:54 PM
Yes I have just one graphic 770px wide inside of just 1 table. The graphic I designed in Photoshop of a car show. My client loves lots of text so I was hopping i could put 1 or 2 scrolling text boxes on top of the graphic. When you say no room for it I just thought you could put scrolling text boxes on top of an image or inside the same table cell of the mage. The map thing is something you do in Dreamweave to make an irregular shape area on your page a link. I used the title at the top of the large graphic a link.
jbechdel@comcast.net

Rob_Che
05-10-2008, 06:43 PM
There's lots of things you need to do to lay out the page as you want it. Maybe grabbing a CSS layout tutorial from the web and maybe a sample template and see how they work... Then you can start laying out the page.

The best way will be the CSS way, then you can float the boxes where you want them.

offtheroad
05-10-2008, 06:57 PM
Thanks, where u from? I got it to work. What I had to do was take out the table and put in a layer to insert my 1 graphic in. Then I could put another layer on top of that later for my scroller to fall into. I had to look around in the code to see where to place my 2nd. layer for my scroller to be into. I realize that everything has to be in between div tags opening and closing. I think where we all had a problem is that my page was just so simple, 1 graphic inside 1 table amd I just didn't know to ask you guys about nested tables. But i realize layers are better. I'll get a CSS manual and study it. One last question, in my CSS edit where do I tell it how much buffer space between the content and the box? I appreciate all your replies and not telling me to take a hike over a tall Mountain. Thanks again.
Jim

Death Dream
05-11-2008, 02:09 AM
There is not attribute 'scroll' in HTML ;)
You have to use CSS:
<div style="width: 200px; height: 200px; overflow: auto;">Your content</div>The scrollbars will automatically appear once the content is too large for the DIV box. Set the width and height to whatever you want it to be.

Oops, had my head somewhere else.

~Death Dream~