M.O.S. Studios Posted October 15, 2010 Share Posted October 15, 2010 this is the code <html> <head> <style type='text/css'> .backButton{ width: 90px; height: 90px; border: 1px solid #000000; overflow: auto; text-align: right; } .backButton img{ margin-right: 90px; } </style> </head> <body> <div class='backButton'> <img src='stop.png'> </div> </body> </html> i want the scrollbar attached to "<div class='backButton'>" to start off scrolled all the wat to the right. any ideas? thanks in advance Quote Link to comment https://forums.phpfreaks.com/topic/215902-scrolling-location/ Share on other sites More sharing options...
Colton.Wagner Posted October 15, 2010 Share Posted October 15, 2010 That is actually a javascript problem not a CSS problem. You need to take a look at the function. window.scrollTo(); I hope I could be of some assistance. If you need any further help please ask. Thanks, Colton Wagner Quote Link to comment https://forums.phpfreaks.com/topic/215902-scrolling-location/#findComment-1122359 Share on other sites More sharing options...
M.O.S. Studios Posted October 15, 2010 Author Share Posted October 15, 2010 I figured JavaScript could do it. I would have preferred to use css thoe. Quote Link to comment https://forums.phpfreaks.com/topic/215902-scrolling-location/#findComment-1122362 Share on other sites More sharing options...
Colton.Wagner Posted October 15, 2010 Share Posted October 15, 2010 Yeah it is not possible in CSS. If it is a necessary part of your website do it in javascript. May I ask why you are trying to apply this? Thanks, Colton Wagner Quote Link to comment https://forums.phpfreaks.com/topic/215902-scrolling-location/#findComment-1122363 Share on other sites More sharing options...
M.O.S. Studios Posted October 15, 2010 Author Share Posted October 15, 2010 yeah, the page is going to load with the image hidden(out side of the div). then im going to use j/s to have it scroll so that it will appear. Quote Link to comment https://forums.phpfreaks.com/topic/215902-scrolling-location/#findComment-1122366 Share on other sites More sharing options...
Colton.Wagner Posted October 15, 2010 Share Posted October 15, 2010 There are a lot better ways to go about doing that. There are javascript scripts that can already do that using jquery. I would try to google it to get a good idea on where to start. Thanks, Colton Wagner Quote Link to comment https://forums.phpfreaks.com/topic/215902-scrolling-location/#findComment-1122368 Share on other sites More sharing options...
M.O.S. Studios Posted October 15, 2010 Author Share Posted October 15, 2010 I know javascript fairly well, i no 0 jquery. Quote Link to comment https://forums.phpfreaks.com/topic/215902-scrolling-location/#findComment-1122371 Share on other sites More sharing options...
Colton.Wagner Posted October 15, 2010 Share Posted October 15, 2010 Jquery is a library that allows cross browser scripting. Basically it makes it so you can write the script once and it will work on most major web browsers. I would just look for a jquery image scrolling script. There is a wide selection so I'm sure you can find one that fits your needs. Thanks, Colron Wagner Quote Link to comment https://forums.phpfreaks.com/topic/215902-scrolling-location/#findComment-1122375 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.