Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › Only allowing one DIV to Scroll
New Posts  All Forums:Forum Nav:

Only allowing one DIV to Scroll

post #1 of 12
Thread Starter 
Hey,

So my goal is to have a normal scroll bar on the right side to only scroll one specific DIV area (and the other DIVs to keep their position and not scroll). I've been playing around with the overcload:auto;, and overload:hidden; commands. But using those I can only get either the scroll bar at the edge of the DIV area (and not on the far right). Or the scroller on the far right, but also a bottom scroller. Is there any other method of doing this? I'd like it to work for mozilla and IE.
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X3 720 @ 3.6 GHz Gigabyte GA-MA790XT-UD4P Gigabyte 4870 1 GB 2x2GB OCZ DDR3 1600 MHz 
Hard DriveOSMonitorKeyboard
600 GB Seagates Windows XP Pro SP3 Envision CRT Logitech Cordless 
PowerCaseMouseMouse Pad
SilverStone DA850 Black Cheiftec Dragon Logitech Cordless Optical ATK 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X3 720 @ 3.6 GHz Gigabyte GA-MA790XT-UD4P Gigabyte 4870 1 GB 2x2GB OCZ DDR3 1600 MHz 
Hard DriveOSMonitorKeyboard
600 GB Seagates Windows XP Pro SP3 Envision CRT Logitech Cordless 
PowerCaseMouseMouse Pad
SilverStone DA850 Black Cheiftec Dragon Logitech Cordless Optical ATK 
  hide details  
Reply
post #2 of 12
ill play around with notepad and see what i can do...i
    
CPUMotherboardGraphicsRAM
Intel C2D e6400 GIGABYTE GA965P-S3 nVidia GeForce 7600GT 1 GB DDR 800 OCZ Gold 
Hard DriveOptical DriveOSMonitor
160GB WD DVD+-RW XP-games+Gentoo-programmin 21' Sun CRT (pwns LCD) 
KeyboardPowerCaseMouse
Regular PS/2 "Quietkey" 680WEchoStar+500Wforfans Uber-modded SuperTower(got for $16!)dual PSU+LEDs USB Optical Dell *ewww, dell* 
Mouse Pad
"ALGOR" POS 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel C2D e6400 GIGABYTE GA965P-S3 nVidia GeForce 7600GT 1 GB DDR 800 OCZ Gold 
Hard DriveOptical DriveOSMonitor
160GB WD DVD+-RW XP-games+Gentoo-programmin 21' Sun CRT (pwns LCD) 
KeyboardPowerCaseMouse
Regular PS/2 "Quietkey" 680WEchoStar+500Wforfans Uber-modded SuperTower(got for $16!)dual PSU+LEDs USB Optical Dell *ewww, dell* 
Mouse Pad
"ALGOR" POS 
  hide details  
Reply
post #3 of 12
GOT IT!
here you go man, just got your answer
paste this code ONLY FOR THE DIV THAT YOU WANT TO SCROLL:


<div style="border : solid 2px #ff0000; background : #000000; color : #ffffff; padding : 4px; width : 200px; height : 50px; overflow : auto; ">
1<br />
2<br />
3<br />
4<br />
5<br />
6<br />
7<br />
8<br />
9<br />
10<br />
</div>


<div whatever properties you want>
</div>
<however many more DIV's you want!>
then all rest up to u, how many div, where they are etc.
NOTE: those text (1,2,3,etc. ...10) in the br's are here for a scrolling list...im assuming you might want that, but if you dont thats cool just edit or replace <br>s with whatever you want rather than numbered lists
EDIT:that is in XHTML, reg HTML will have just <br> rather than <br />
so reg HTML is same, like this:
<div style="border : solid 2px #ff0000; background : #000000; color : #ffffff; padding : 4px; width : 200px; height : 50px; overflow : auto; ">
1<br>
2<br>
3<br>
4<br>
5<br>
6<br>
7<br>
8<br>
9<br>
10<br>
</div>
    
CPUMotherboardGraphicsRAM
Intel C2D e6400 GIGABYTE GA965P-S3 nVidia GeForce 7600GT 1 GB DDR 800 OCZ Gold 
Hard DriveOptical DriveOSMonitor
160GB WD DVD+-RW XP-games+Gentoo-programmin 21' Sun CRT (pwns LCD) 
KeyboardPowerCaseMouse
Regular PS/2 &quot;Quietkey&quot; 680WEchoStar+500Wforfans Uber-modded SuperTower(got for $16!)dual PSU+LEDs USB Optical Dell *ewww, dell* 
Mouse Pad
"ALGOR" POS 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel C2D e6400 GIGABYTE GA965P-S3 nVidia GeForce 7600GT 1 GB DDR 800 OCZ Gold 
Hard DriveOptical DriveOSMonitor
160GB WD DVD+-RW XP-games+Gentoo-programmin 21' Sun CRT (pwns LCD) 
KeyboardPowerCaseMouse
Regular PS/2 &quot;Quietkey&quot; 680WEchoStar+500Wforfans Uber-modded SuperTower(got for $16!)dual PSU+LEDs USB Optical Dell *ewww, dell* 
Mouse Pad
"ALGOR" POS 
  hide details  
Reply
post #4 of 12
u can adjust height width border like anything else probly make it bigger, but thats it for the list
    
CPUMotherboardGraphicsRAM
Intel C2D e6400 GIGABYTE GA965P-S3 nVidia GeForce 7600GT 1 GB DDR 800 OCZ Gold 
Hard DriveOptical DriveOSMonitor
160GB WD DVD+-RW XP-games+Gentoo-programmin 21' Sun CRT (pwns LCD) 
KeyboardPowerCaseMouse
Regular PS/2 &quot;Quietkey&quot; 680WEchoStar+500Wforfans Uber-modded SuperTower(got for $16!)dual PSU+LEDs USB Optical Dell *ewww, dell* 
Mouse Pad
"ALGOR" POS 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel C2D e6400 GIGABYTE GA965P-S3 nVidia GeForce 7600GT 1 GB DDR 800 OCZ Gold 
Hard DriveOptical DriveOSMonitor
160GB WD DVD+-RW XP-games+Gentoo-programmin 21' Sun CRT (pwns LCD) 
KeyboardPowerCaseMouse
Regular PS/2 &quot;Quietkey&quot; 680WEchoStar+500Wforfans Uber-modded SuperTower(got for $16!)dual PSU+LEDs USB Optical Dell *ewww, dell* 
Mouse Pad
"ALGOR" POS 
  hide details  
Reply
post #5 of 12
and I KNOW IT WORKS, I JUST PUT IT IN A WEB PAGE BETWEEN TWO OTHER DIV'S, NO PROBLEMS ONLY SCROLLS DIV YOU PASTE THAT CODE FOR
    
CPUMotherboardGraphicsRAM
Intel C2D e6400 GIGABYTE GA965P-S3 nVidia GeForce 7600GT 1 GB DDR 800 OCZ Gold 
Hard DriveOptical DriveOSMonitor
160GB WD DVD+-RW XP-games+Gentoo-programmin 21' Sun CRT (pwns LCD) 
KeyboardPowerCaseMouse
Regular PS/2 &quot;Quietkey&quot; 680WEchoStar+500Wforfans Uber-modded SuperTower(got for $16!)dual PSU+LEDs USB Optical Dell *ewww, dell* 
Mouse Pad
"ALGOR" POS 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel C2D e6400 GIGABYTE GA965P-S3 nVidia GeForce 7600GT 1 GB DDR 800 OCZ Gold 
Hard DriveOptical DriveOSMonitor
160GB WD DVD+-RW XP-games+Gentoo-programmin 21' Sun CRT (pwns LCD) 
KeyboardPowerCaseMouse
Regular PS/2 &quot;Quietkey&quot; 680WEchoStar+500Wforfans Uber-modded SuperTower(got for $16!)dual PSU+LEDs USB Optical Dell *ewww, dell* 
Mouse Pad
"ALGOR" POS 
  hide details  
Reply
post #6 of 12
Thread Starter 
Yeah, that's what I am using at the moment, but the scroller bar is placed just to the right of the DIV, and I want it to be at the far right side (like a normal scroller). You can take a look here:

http://www.mines.edu/stu_life/organ/ski/info.html

But it's not that big of a deal. I know I can just make the DIV wider, but I don't really want to do that either, because of different people having different resolutions. Thanks for the try though.
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X3 720 @ 3.6 GHz Gigabyte GA-MA790XT-UD4P Gigabyte 4870 1 GB 2x2GB OCZ DDR3 1600 MHz 
Hard DriveOSMonitorKeyboard
600 GB Seagates Windows XP Pro SP3 Envision CRT Logitech Cordless 
PowerCaseMouseMouse Pad
SilverStone DA850 Black Cheiftec Dragon Logitech Cordless Optical ATK 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X3 720 @ 3.6 GHz Gigabyte GA-MA790XT-UD4P Gigabyte 4870 1 GB 2x2GB OCZ DDR3 1600 MHz 
Hard DriveOSMonitorKeyboard
600 GB Seagates Windows XP Pro SP3 Envision CRT Logitech Cordless 
PowerCaseMouseMouse Pad
SilverStone DA850 Black Cheiftec Dragon Logitech Cordless Optical ATK 
  hide details  
Reply
post #7 of 12
on that page its frames isnt it? =0
2011 Build
(13 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500K Asus P8P67 LE Asus 560ti DirectCU II 8GB Corsair Vengeance Blue 
Hard DriveOptical DriveOSMonitor
400GB Samsung F3 LG Bluray+HDDVD Windows 7 64Bit Samsung BX2231 
KeyboardPowerCaseMouse
Bush thing from Argos 600W Tagan Modular Coolermaster Wavemaster Microsoft Value 
Mouse Pad
None 
  hide details  
Reply
2011 Build
(13 items)
 
  
CPUMotherboardGraphicsRAM
i5 2500K Asus P8P67 LE Asus 560ti DirectCU II 8GB Corsair Vengeance Blue 
Hard DriveOptical DriveOSMonitor
400GB Samsung F3 LG Bluray+HDDVD Windows 7 64Bit Samsung BX2231 
KeyboardPowerCaseMouse
Bush thing from Argos 600W Tagan Modular Coolermaster Wavemaster Microsoft Value 
Mouse Pad
None 
  hide details  
Reply
post #8 of 12
Thread Starter 
No frames at all, just DIVs. Just that scroll bar there makes it look like it.
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X3 720 @ 3.6 GHz Gigabyte GA-MA790XT-UD4P Gigabyte 4870 1 GB 2x2GB OCZ DDR3 1600 MHz 
Hard DriveOSMonitorKeyboard
600 GB Seagates Windows XP Pro SP3 Envision CRT Logitech Cordless 
PowerCaseMouseMouse Pad
SilverStone DA850 Black Cheiftec Dragon Logitech Cordless Optical ATK 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X3 720 @ 3.6 GHz Gigabyte GA-MA790XT-UD4P Gigabyte 4870 1 GB 2x2GB OCZ DDR3 1600 MHz 
Hard DriveOSMonitorKeyboard
600 GB Seagates Windows XP Pro SP3 Envision CRT Logitech Cordless 
PowerCaseMouseMouse Pad
SilverStone DA850 Black Cheiftec Dragon Logitech Cordless Optical ATK 
  hide details  
Reply
post #9 of 12
Quote:
Originally Posted by DeathONator
Yeah, that's what I am using at the moment, but the scroller bar is placed just to the right of the DIV, and I want it to be at the far right side (like a normal scroller). You can take a look here:

http://www.mines.edu/stu_life/organ/ski/info.html

But it's not that big of a deal. I know I can just make the DIV wider, but I don't really want to do that either, because of different people having different resolutions. Thanks for the try though.
easy just make the div 100% page width by adding the property width=100%
    
CPUMotherboardGraphicsRAM
Intel C2D e6400 GIGABYTE GA965P-S3 nVidia GeForce 7600GT 1 GB DDR 800 OCZ Gold 
Hard DriveOptical DriveOSMonitor
160GB WD DVD+-RW XP-games+Gentoo-programmin 21' Sun CRT (pwns LCD) 
KeyboardPowerCaseMouse
Regular PS/2 &quot;Quietkey&quot; 680WEchoStar+500Wforfans Uber-modded SuperTower(got for $16!)dual PSU+LEDs USB Optical Dell *ewww, dell* 
Mouse Pad
"ALGOR" POS 
  hide details  
Reply
    
CPUMotherboardGraphicsRAM
Intel C2D e6400 GIGABYTE GA965P-S3 nVidia GeForce 7600GT 1 GB DDR 800 OCZ Gold 
Hard DriveOptical DriveOSMonitor
160GB WD DVD+-RW XP-games+Gentoo-programmin 21' Sun CRT (pwns LCD) 
KeyboardPowerCaseMouse
Regular PS/2 &quot;Quietkey&quot; 680WEchoStar+500Wforfans Uber-modded SuperTower(got for $16!)dual PSU+LEDs USB Optical Dell *ewww, dell* 
Mouse Pad
"ALGOR" POS 
  hide details  
Reply
post #10 of 12
Thread Starter 
That's a good idea, but I have the menu in a DIV of it's self as well. So I would have to make the menu DIV something like 10%, and the body DIV 90%. But then the menu DIV might be too big or too small depending on the user's resolution. Also, in IE the scroll bar is not placed on the far right side. The far right scroll bar is "greyed out", and the DIV's scroll bar is placed inside of it.
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X3 720 @ 3.6 GHz Gigabyte GA-MA790XT-UD4P Gigabyte 4870 1 GB 2x2GB OCZ DDR3 1600 MHz 
Hard DriveOSMonitorKeyboard
600 GB Seagates Windows XP Pro SP3 Envision CRT Logitech Cordless 
PowerCaseMouseMouse Pad
SilverStone DA850 Black Cheiftec Dragon Logitech Cordless Optical ATK 
  hide details  
Reply
My System
(13 items)
 
  
CPUMotherboardGraphicsRAM
AMD Phenom II X3 720 @ 3.6 GHz Gigabyte GA-MA790XT-UD4P Gigabyte 4870 1 GB 2x2GB OCZ DDR3 1600 MHz 
Hard DriveOSMonitorKeyboard
600 GB Seagates Windows XP Pro SP3 Envision CRT Logitech Cordless 
PowerCaseMouseMouse Pad
SilverStone DA850 Black Cheiftec Dragon Logitech Cordless Optical ATK 
  hide details  
Reply
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › Only allowing one DIV to Scroll