Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › Friend is having issues with Java script and alignment.
New Posts  All Forums:Forum Nav:

Friend is having issues with Java script and alignment.  

post #1 of 7
Thread Starter 
I can post the website that he is using this on, but I don't know if that's allowed.

He has his own personal photography website that he is trying to code for. He has done pretty well, but he is running into a problem.

On larger monitors, the background image doesn't fit the screen horizontally. He can get it to fit, but then it breaks the java script, and no longer has the scrolling animation he wants. It's one of those sites that you can click the navigation bar up top, and it scrolls on the page. It also doesn't just scroll, it... I don't know anything with this stuff...

It basically auto scrolls to fit the next page on screen. All that breaks (even the bar at the top) when he adds the line of code to fix the image.

I will be forcing him to make an account here, but it may be a bit. I'll add him to this thread, so if you don't know how you can help him since I couldn't really explain it, please stick around for when I get him in here.
Primary
(19 items)
 
Secondary
(9 items)
 
Tertiary
(10 items)
 
CPUMotherboardGraphicsRAM
4690k Gigabyte Z97X Gaming 5 Gigabyte Windforce 1070 Corsair Vengeance 1600C10 1.5V (2x8GB) 
Hard DriveHard DriveHard DriveHard Drive
Seagate 1TB (ST1000DM003 9YN162) Seagate 2TB (ST2000DM001 1CH164 Seagate 1TB (ST1000DM003 1CH162 Trion 150 960GB 
Optical DriveCoolingOSMonitor
Some LG Blu-Ray Corsair H100 Windows 7 Home Premium 64bit Acer V246HL 
MonitorMonitorKeyboardPower
Acer G245HQ ASUS MX25AQ Logitec G710+ Rosewill Capstone 450W 
CaseMouseMouse Pad
Cooler Master Haf XB EVO Roccat Lua My table 
CPUMotherboardGraphicsRAM
AMD FX 8350 ASUS Sabertooth 990FX EVGA 560TI ADATA 4x2GB 1600C9 1.65V-1.5V 
Hard DriveCoolingOSPower
Some 2.5in 1TB drive Stock Windows 7 Home Premium 64bit Corsair TX850 
Case
Cooler Master HAF 
CPUMotherboardRAMOptical Drive
i7-960 Gigabyte X58 ADATA 2x2GB 1600C9 1.65V-1.5V Generic DVD 
CoolingOSMonitorKeyboard
Asetek 510LC Linux with pfSense in VM Some generic 1280x1024 Generic 
CaseMouse
Corsair Carbide 400R Generic 
  hide details  
Primary
(19 items)
 
Secondary
(9 items)
 
Tertiary
(10 items)
 
CPUMotherboardGraphicsRAM
4690k Gigabyte Z97X Gaming 5 Gigabyte Windforce 1070 Corsair Vengeance 1600C10 1.5V (2x8GB) 
Hard DriveHard DriveHard DriveHard Drive
Seagate 1TB (ST1000DM003 9YN162) Seagate 2TB (ST2000DM001 1CH164 Seagate 1TB (ST1000DM003 1CH162 Trion 150 960GB 
Optical DriveCoolingOSMonitor
Some LG Blu-Ray Corsair H100 Windows 7 Home Premium 64bit Acer V246HL 
MonitorMonitorKeyboardPower
Acer G245HQ ASUS MX25AQ Logitec G710+ Rosewill Capstone 450W 
CaseMouseMouse Pad
Cooler Master Haf XB EVO Roccat Lua My table 
CPUMotherboardGraphicsRAM
AMD FX 8350 ASUS Sabertooth 990FX EVGA 560TI ADATA 4x2GB 1600C9 1.65V-1.5V 
Hard DriveCoolingOSPower
Some 2.5in 1TB drive Stock Windows 7 Home Premium 64bit Corsair TX850 
Case
Cooler Master HAF 
CPUMotherboardRAMOptical Drive
i7-960 Gigabyte X58 ADATA 2x2GB 1600C9 1.65V-1.5V Generic DVD 
CoolingOSMonitorKeyboard
Asetek 510LC Linux with pfSense in VM Some generic 1280x1024 Generic 
CaseMouse
Corsair Carbide 400R Generic 
  hide details  
post #2 of 7
Can't say what the issue is without seeing some code. If you want to post the site, we should be able to see everything we need.

But in general, I'd say if the screen size is breaking the javascript, then he's doing something wrong. He should be using less javascript and more CSS.
Death Star
(21 items)
 
Darksaber
(11 items)
 
 
CPUMotherboardGraphicsRAM
Athlon II x2 245 Asus M3A78 Radeon HD6570 1GB Mushkin Silverline 2GB DDR2  
Hard DriveOptical DriveOSMonitor
OCZ Vertex 2 120GB Samsung Blu-Ray Windows 7 Samsung 46" DLP 
PowerCaseOther
Silverstone Strider Essentials 400W Silverstone Milo ML03B Hauppage WinTV 1250 
  hide details  
Death Star
(21 items)
 
Darksaber
(11 items)
 
 
CPUMotherboardGraphicsRAM
Athlon II x2 245 Asus M3A78 Radeon HD6570 1GB Mushkin Silverline 2GB DDR2  
Hard DriveOptical DriveOSMonitor
OCZ Vertex 2 120GB Samsung Blu-Ray Windows 7 Samsung 46" DLP 
PowerCaseOther
Silverstone Strider Essentials 400W Silverstone Milo ML03B Hauppage WinTV 1250 
  hide details  
post #3 of 7
Thread Starter 
Unfortunately, it says in OCN's terms, you cannot link personal webpages, however, I can do this. Huge pic (Click to show)
It does auto fit any resolution below 1366x768, and fits his MBPR, but at 1920x1080, it does that. And yes the white on the side of the screen is where the image should fit to. I don't know about coding, but he says it's set to 100% (referring to image size), but it looks like it stretches to fit the screen, but hits the limit vertically, so it cannot stretch horizontally anymore.

EDIT: There is no 'app', this is him testing web design skills, or trying to do something for his portfolio. There is no monetary gain here.
Primary
(19 items)
 
Secondary
(9 items)
 
Tertiary
(10 items)
 
CPUMotherboardGraphicsRAM
4690k Gigabyte Z97X Gaming 5 Gigabyte Windforce 1070 Corsair Vengeance 1600C10 1.5V (2x8GB) 
Hard DriveHard DriveHard DriveHard Drive
Seagate 1TB (ST1000DM003 9YN162) Seagate 2TB (ST2000DM001 1CH164 Seagate 1TB (ST1000DM003 1CH162 Trion 150 960GB 
Optical DriveCoolingOSMonitor
Some LG Blu-Ray Corsair H100 Windows 7 Home Premium 64bit Acer V246HL 
MonitorMonitorKeyboardPower
Acer G245HQ ASUS MX25AQ Logitec G710+ Rosewill Capstone 450W 
CaseMouseMouse Pad
Cooler Master Haf XB EVO Roccat Lua My table 
CPUMotherboardGraphicsRAM
AMD FX 8350 ASUS Sabertooth 990FX EVGA 560TI ADATA 4x2GB 1600C9 1.65V-1.5V 
Hard DriveCoolingOSPower
Some 2.5in 1TB drive Stock Windows 7 Home Premium 64bit Corsair TX850 
Case
Cooler Master HAF 
CPUMotherboardRAMOptical Drive
i7-960 Gigabyte X58 ADATA 2x2GB 1600C9 1.65V-1.5V Generic DVD 
CoolingOSMonitorKeyboard
Asetek 510LC Linux with pfSense in VM Some generic 1280x1024 Generic 
CaseMouse
Corsair Carbide 400R Generic 
  hide details  
Primary
(19 items)
 
Secondary
(9 items)
 
Tertiary
(10 items)
 
CPUMotherboardGraphicsRAM
4690k Gigabyte Z97X Gaming 5 Gigabyte Windforce 1070 Corsair Vengeance 1600C10 1.5V (2x8GB) 
Hard DriveHard DriveHard DriveHard Drive
Seagate 1TB (ST1000DM003 9YN162) Seagate 2TB (ST2000DM001 1CH164 Seagate 1TB (ST1000DM003 1CH162 Trion 150 960GB 
Optical DriveCoolingOSMonitor
Some LG Blu-Ray Corsair H100 Windows 7 Home Premium 64bit Acer V246HL 
MonitorMonitorKeyboardPower
Acer G245HQ ASUS MX25AQ Logitec G710+ Rosewill Capstone 450W 
CaseMouseMouse Pad
Cooler Master Haf XB EVO Roccat Lua My table 
CPUMotherboardGraphicsRAM
AMD FX 8350 ASUS Sabertooth 990FX EVGA 560TI ADATA 4x2GB 1600C9 1.65V-1.5V 
Hard DriveCoolingOSPower
Some 2.5in 1TB drive Stock Windows 7 Home Premium 64bit Corsair TX850 
Case
Cooler Master HAF 
CPUMotherboardRAMOptical Drive
i7-960 Gigabyte X58 ADATA 2x2GB 1600C9 1.65V-1.5V Generic DVD 
CoolingOSMonitorKeyboard
Asetek 510LC Linux with pfSense in VM Some generic 1280x1024 Generic 
CaseMouse
Corsair Carbide 400R Generic 
  hide details  
post #4 of 7
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
post #5 of 7
Thread Starter 
Sent him link. He may be at work for a few more hours.

Update: He says he's tried that, but the site is a "One page scroll-er". The advice on that page would turn the entire page into that background.
Edited by AcEsSalvation - 4/15/14 at 3:36pm
Primary
(19 items)
 
Secondary
(9 items)
 
Tertiary
(10 items)
 
CPUMotherboardGraphicsRAM
4690k Gigabyte Z97X Gaming 5 Gigabyte Windforce 1070 Corsair Vengeance 1600C10 1.5V (2x8GB) 
Hard DriveHard DriveHard DriveHard Drive
Seagate 1TB (ST1000DM003 9YN162) Seagate 2TB (ST2000DM001 1CH164 Seagate 1TB (ST1000DM003 1CH162 Trion 150 960GB 
Optical DriveCoolingOSMonitor
Some LG Blu-Ray Corsair H100 Windows 7 Home Premium 64bit Acer V246HL 
MonitorMonitorKeyboardPower
Acer G245HQ ASUS MX25AQ Logitec G710+ Rosewill Capstone 450W 
CaseMouseMouse Pad
Cooler Master Haf XB EVO Roccat Lua My table 
CPUMotherboardGraphicsRAM
AMD FX 8350 ASUS Sabertooth 990FX EVGA 560TI ADATA 4x2GB 1600C9 1.65V-1.5V 
Hard DriveCoolingOSPower
Some 2.5in 1TB drive Stock Windows 7 Home Premium 64bit Corsair TX850 
Case
Cooler Master HAF 
CPUMotherboardRAMOptical Drive
i7-960 Gigabyte X58 ADATA 2x2GB 1600C9 1.65V-1.5V Generic DVD 
CoolingOSMonitorKeyboard
Asetek 510LC Linux with pfSense in VM Some generic 1280x1024 Generic 
CaseMouse
Corsair Carbide 400R Generic 
  hide details  
Primary
(19 items)
 
Secondary
(9 items)
 
Tertiary
(10 items)
 
CPUMotherboardGraphicsRAM
4690k Gigabyte Z97X Gaming 5 Gigabyte Windforce 1070 Corsair Vengeance 1600C10 1.5V (2x8GB) 
Hard DriveHard DriveHard DriveHard Drive
Seagate 1TB (ST1000DM003 9YN162) Seagate 2TB (ST2000DM001 1CH164 Seagate 1TB (ST1000DM003 1CH162 Trion 150 960GB 
Optical DriveCoolingOSMonitor
Some LG Blu-Ray Corsair H100 Windows 7 Home Premium 64bit Acer V246HL 
MonitorMonitorKeyboardPower
Acer G245HQ ASUS MX25AQ Logitec G710+ Rosewill Capstone 450W 
CaseMouseMouse Pad
Cooler Master Haf XB EVO Roccat Lua My table 
CPUMotherboardGraphicsRAM
AMD FX 8350 ASUS Sabertooth 990FX EVGA 560TI ADATA 4x2GB 1600C9 1.65V-1.5V 
Hard DriveCoolingOSPower
Some 2.5in 1TB drive Stock Windows 7 Home Premium 64bit Corsair TX850 
Case
Cooler Master HAF 
CPUMotherboardRAMOptical Drive
i7-960 Gigabyte X58 ADATA 2x2GB 1600C9 1.65V-1.5V Generic DVD 
CoolingOSMonitorKeyboard
Asetek 510LC Linux with pfSense in VM Some generic 1280x1024 Generic 
CaseMouse
Corsair Carbide 400R Generic 
  hide details  
post #6 of 7
Well then post a link to the site. We can't do any thing more the make wild guesses at to the problem with out seeing the code.

or

grab the page source and post it, that's what we need to see anyway
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
Core I7
(13 items)
 
  
CPUMotherboardGraphicsRAM
I7 920 rev. D0 @ 4.26Ghz EVGA X58 SLI EVGA GTX 285 OCZ XMP 3x2Gb (pc3 12800) 
Hard DriveOptical DriveOSMonitor
Western Digital Caviar Black 640Gb x 2 LG GH22LS30 openSuse 12.1 x64 HP F2105 
PowerCase
CORSAIR 850TX Cooler Master ATCS 840 
  hide details  
post #7 of 7
Thread Starter 
Alright, I've got him to make an account, I just don't know when he will. I'll have him post the code and explain what it is he is wanting to do better than I did.
Primary
(19 items)
 
Secondary
(9 items)
 
Tertiary
(10 items)
 
CPUMotherboardGraphicsRAM
4690k Gigabyte Z97X Gaming 5 Gigabyte Windforce 1070 Corsair Vengeance 1600C10 1.5V (2x8GB) 
Hard DriveHard DriveHard DriveHard Drive
Seagate 1TB (ST1000DM003 9YN162) Seagate 2TB (ST2000DM001 1CH164 Seagate 1TB (ST1000DM003 1CH162 Trion 150 960GB 
Optical DriveCoolingOSMonitor
Some LG Blu-Ray Corsair H100 Windows 7 Home Premium 64bit Acer V246HL 
MonitorMonitorKeyboardPower
Acer G245HQ ASUS MX25AQ Logitec G710+ Rosewill Capstone 450W 
CaseMouseMouse Pad
Cooler Master Haf XB EVO Roccat Lua My table 
CPUMotherboardGraphicsRAM
AMD FX 8350 ASUS Sabertooth 990FX EVGA 560TI ADATA 4x2GB 1600C9 1.65V-1.5V 
Hard DriveCoolingOSPower
Some 2.5in 1TB drive Stock Windows 7 Home Premium 64bit Corsair TX850 
Case
Cooler Master HAF 
CPUMotherboardRAMOptical Drive
i7-960 Gigabyte X58 ADATA 2x2GB 1600C9 1.65V-1.5V Generic DVD 
CoolingOSMonitorKeyboard
Asetek 510LC Linux with pfSense in VM Some generic 1280x1024 Generic 
CaseMouse
Corsair Carbide 400R Generic 
  hide details  
Primary
(19 items)
 
Secondary
(9 items)
 
Tertiary
(10 items)
 
CPUMotherboardGraphicsRAM
4690k Gigabyte Z97X Gaming 5 Gigabyte Windforce 1070 Corsair Vengeance 1600C10 1.5V (2x8GB) 
Hard DriveHard DriveHard DriveHard Drive
Seagate 1TB (ST1000DM003 9YN162) Seagate 2TB (ST2000DM001 1CH164 Seagate 1TB (ST1000DM003 1CH162 Trion 150 960GB 
Optical DriveCoolingOSMonitor
Some LG Blu-Ray Corsair H100 Windows 7 Home Premium 64bit Acer V246HL 
MonitorMonitorKeyboardPower
Acer G245HQ ASUS MX25AQ Logitec G710+ Rosewill Capstone 450W 
CaseMouseMouse Pad
Cooler Master Haf XB EVO Roccat Lua My table 
CPUMotherboardGraphicsRAM
AMD FX 8350 ASUS Sabertooth 990FX EVGA 560TI ADATA 4x2GB 1600C9 1.65V-1.5V 
Hard DriveCoolingOSPower
Some 2.5in 1TB drive Stock Windows 7 Home Premium 64bit Corsair TX850 
Case
Cooler Master HAF 
CPUMotherboardRAMOptical Drive
i7-960 Gigabyte X58 ADATA 2x2GB 1600C9 1.65V-1.5V Generic DVD 
CoolingOSMonitorKeyboard
Asetek 510LC Linux with pfSense in VM Some generic 1280x1024 Generic 
CaseMouse
Corsair Carbide 400R Generic 
  hide details  
New Posts  All Forums:Forum Nav:
  Return Home
  Back to Forum: Web Coding
This thread is locked  
Overclock.net › Forums › Software, Programming and Coding › Coding and Programming › Web Coding › Friend is having issues with Java script and alignment.