bang_iti08
08-26-2008, 11:03 PM
hi all. in my program using long texts.so it will take more pages. i want create scroll window inside my browser window to show these texts. hlp..
|
Click to See Complete Forum and Search --> : how to create scroll window inside the browser window bang_iti08 08-26-2008, 11:03 PM hi all. in my program using long texts.so it will take more pages. i want create scroll window inside my browser window to show these texts. hlp.. ray326 08-26-2008, 11:29 PM Use a div with a fixed height (and optionally width) and overflow:auto. bang_iti08 08-27-2008, 12:26 AM thank ray. i will try but it will not work. i send my code. HTML CODE: <html> <head> <title></title> </head> <body><div height="20%" overflow:"auto"> <table border="1"><tr><td> Wind turbines convert the wind’s kinetic energy into mechanical power. This mechanical power can be used for specific tasks (such as grinding grain or pumping water) or a generator can convert this mechanical power into electricity to power homes, businesses, schools, and the like. Wind Turbines Wind turbines, like aircraft propeller blades, turn in the moving air and power an electric generator that supplies an electric current. Simply stated, a wind turbine is the opposite of a fan. Instead of using electricity to make wind, like a fan, wind turbines use wind to make electricity. The wind turns the blades, which spin a shaft, which connects to a generator and makes electricity. Wind Turbine Types Modern wind turbines fall into two basic groups; the horizontal-axis variety, like the traditional farm windmills used for pumping water, and the vertical-axis design, like the eggbeater-style Darrieus model, named after its French inventor. Most large modern wind turbines are horizontal-axis turbines. Turbine Components Horizontal turbine components include: • a blade or rotor, which converts the energy in the wind to rotational shaft energy; • a drive train, usually including a gearbox and a generator; • a tower that supports the rotor and drive train; and • other equipment, including controls, electrical cables, ground support equipment, and interconnection equipment. Some wind machines have fail-safe shutdown systems so that if part of the machine fails, the shutdown systems turn the blades out of the wind or put on brakes. Wind turbines convert the wind’s kinetic energy into mechanical power. This mechanical power can be used for specific tasks (such as grinding grain or pumping water) or a generator can convert this mechanical power into electricity to power homes, businesses, schools, and the like. Wind Turbines Wind turbines, like aircraft propeller blades, turn in the moving air and power an electric generator that supplies an electric current. Simply stated, a wind turbine is the opposite of a fan. Instead of using electricity to make wind, like a fan, wind turbines use wind to make electricity. The wind turns the blades, which spin a shaft, which connects to a generator and makes electricity. Wind Turbine Types Modern wind turbines fall into two basic groups; the horizontal-axis variety, like the traditional farm windmills used for pumping water, and the vertical-axis design, like the eggbeater-style Darrieus model, named after its French inventor. Most large modern wind turbines are horizontal-axis turbines. Turbine Components Horizontal turbine components include: • a blade or rotor, which converts the energy in the wind to rotational shaft energy; • a drive train, usually including a gearbox and a generator; </td></tr> </table></div> </body> </html> hlp.. WebJoel 08-27-2008, 07:39 AM <body><div height="20%" overflow:"auto"> Because you are trying to use inline-style CSS as an HTML tag. Try it this way: <body><div height="20%" style="overflow:auto;"> This is called "inline-style" css. The height="20%" will work, but it is variable based upon the height of the visitor's monitor, subject to change. I would suggest a FIXED height solution, like height="500". And better yet since believe it or not, height="" is InternetExploder-proprietary, I'd move this over into the inline-style for this element, like this; <div style="overflow:auto; height:20%"> Now, it will validate on all browsers because this is W3C ("World-Wide-Web Consortium") -compliant Kewl, huh? :) OctoberWind 08-27-2008, 07:46 AM edit: and WebJoel beat me, because I decided to actually get dressed for work... first off, this is "illegal" <div height="20%" overflow:"auto"> it should be this: <div style="height: 20%; overflow: auto;"> second, drop the table. It's doing absolutely nothing for you. You should really be using semantic markup (using <p> for paragraphs, <ul>/<ol> for lists. If you really want a border around your text add this: <div style="height: 20%; overflow: auto; border: solid 2px #999;"> WebJoel 08-27-2008, 07:49 AM <--doing the ferretine happy-dance! -Hi Oct.Wind! :) OctoberWind 08-27-2008, 10:12 AM /wave WebJoel O.o? ray326 08-27-2008, 11:04 PM And setting a percentage div height on a container without a defined height is senseless. bang_iti08 08-27-2008, 11:44 PM thanks all of u. it work fine.byee... bang_iti08 08-28-2008, 11:48 PM its working fine. but i want inside the table . why means i create to scroll windows(left side) display image and (right side) display appropriate texts. so im using <p> it will show one window but another window shown by bottom. i tried to move left and right, but it will not accept. i but table tag that scroll bar disappear. so what can i do this problem. im tried align, valign ,etc.. properties but i will not work. ray326 08-29-2008, 10:22 PM Doesn't sound like a paragraph. Hard to understand but sounds like either two side-by-side divs or maybe a definition list (<dl>,<dt>,<dd>). webdeveloper.com
Copyright Internet.com Inc., All Rights Reserved. |