Warning: fopen(graphic_design/files/thread-1683-1.txt) [function.fopen]: failed to open stream: Permission denied in /graphic_design/global.php on line 421
file NOT opened scrollbox for news, etc. -
PDA

View Full Version : scrollbox for news, etc.


hawkmoon269
08-21-2004, 11:29 PM
I haven't been able to successfuly add one to a page I'm building (Dreamweaver 4). What is the code for one of these things?? :furious3: Probably a dumb question, but I'm a complete novice here...

thanks, Rob

haumovie
08-22-2004, 02:45 AM
Perhaps this is an amateur answer, but I would add an iframe or divbox. I favour the iframe myself.

Iframes are like regular frames, only they aren't part of a frameset, so you can put them anywhere (in-line frame). You just put in a ref to another page, be that php, html, xml...whatever. Very easy to deal with.

Hope this helps:)

kriegs
08-22-2004, 10:42 AM
http://htmlgoodies.com/tutors/inlineframes.html

^ Info on iFrames :)

hawkmoon269
08-22-2004, 10:55 AM
Thanks for that link, I'm about to try this... would the divbox have any advantages over the iFrame, tho?

hawkmoon269
08-22-2004, 03:47 PM
That worked great! Just having a problem getting the height to work... see pic.

kriegs
08-22-2004, 04:35 PM
the reason for the horizontal scroll is the content your loading, is wider then the width of the table. Try to make it about 10px shorter than the width of the table, usually helps :)

For example:
your iframe is 300px wide. The page your loading is like 300px or more. Try setting the content in a table or something, to about 285-290px should get rid of the horizontal scroll :)

hawkmoon269
08-22-2004, 05:53 PM
Got rid of that horizontal scroll, thanks. BUT - I've been trying to get the frame height to match that of the other box on the right. Changing the HEIGHT= in the code hasn't worked... Rest of the pages have been a snap, so if this is the toughest thing I've had to deal with, no complaints :)

Glyphon
08-22-2004, 09:55 PM
are you defining height= as height="300" or height="300px"?

also, to answer your question about iframe vs. div, netscape (firefox) doesn't support div, it uses layer where as iframe works inboth. but if you wanted to use div/layer instead, then you'd just have to use a browser detection script to use the appropriate code.

Arch Stanton
08-23-2004, 09:14 AM
also, to answer your question about iframe vs. div, netscape (firefox) doesn't support div, it uses layer where as iframe works inboth. but if you wanted to use div/layer instead, then you'd just have to use a browser detection script to use the appropriate code.

Actually, as long as you use doctype declarations the div will work fine (it should work without is as well, just a bit unpredictable, but no different than IE). Netscape 4.x doesn't support it, but Mozilla, Firefox, Netscape 6+, and Opera support divs just fine. You will run into some problems with javascripts that deal with divs, but other than that, divs work just fine.

hawkmoon269
08-23-2004, 01:56 PM
are you defining height= as height="300" or height="300px"?

I've tried it both ways, actually... it being in its own separate layer shouldn't matter, ay?

Arch Stanton
08-23-2004, 02:15 PM
300px is not a valid value for a HTML attribute. It is a valid value for a CSS attribute. You might want to set your height with CSS, which usually will override any other size specified. The quick and dirty method to do this is to use the style attribute in your DIV or IFRAME tag. Like so:

<tag style="attribute:value;">

Because the style only affects that specific tag, you don't need an entire declaration, just the attributes and their values. You might use something like this:

style="widht:300px;"

Koobi
08-28-2004, 01:30 PM
I know this is a late reply (my ISP has been having problems) but I should mention that iframes are not accessible to all browsers...I realize that you're just trying this out or making a site but in the future, if you want your site to be 100% accessible, iframes would be a bad option. You could use the CSS alternative instead. (http://www.w3schools.com/css/pr_pos_overflow.asp)