darkbelly Posted January 24, 2012 Share Posted January 24, 2012 Is there any way to make text and images on a page to scroll just between 2 points on a page? cause i got a scroll like background and i used the css command background attachment fixed....but it scrolls over my scroll edges and id like to make it scroll lower ....sorry for my bad english ...i hope i made myself understood ....thx in advance. Link to comment Share on other sites More sharing options...
Ingolme Posted January 24, 2012 Share Posted January 24, 2012 I'm not sure exactly what you mean, but you could put them inside an element and give the element a height and overflow property. HTML:<div id="scrollbox"> All text and images go here.</div> CSS:#scrollbox { height: 300px; /* Change this value to whichever fits your page best */ overflow: auto;} Link to comment Share on other sites More sharing options...
darkbelly Posted January 24, 2012 Author Share Posted January 24, 2012 shall i post the code here so you see what im talking about? cuz im a newbie its my first html project Link to comment Share on other sites More sharing options...
davidb52 Posted January 24, 2012 Share Posted January 24, 2012 Yes show us your code, it's not dangerous Link to comment Share on other sites More sharing options...
darkbelly Posted January 25, 2012 Author Share Posted January 25, 2012 <html><head><style type="text/css">body p {font-family: Wolgast Script;}.wolg {font-family: Wolgast Script;}.wolg {font-family: Wolgast Script;}body {background-image: url(parch+back.gif);background-repeat:no-repeat;background-position:center center;background-attachment:fixed;-o-background-size: 100% 100%, auto;-moz-background-size: 100% 100%, auto;-webkit-background-size: 100% 100%, auto;background-size: 100% 100%, auto;}</style></head><body background="parch+back.gif" width="55%" height="55%"><div style="position:absolute; left: 367px; top: -6px;"><img src="ce este budismul.gif" width="482" height="127"></div><div class="wolg" style="position:absolute; left: 353px; top: 132px; width: 601px;"><p align="justify" style="margin-left: 0px; margin-top: 0px; margin-right: 0px"><font size="5"> <div style="position:absolute; left: -344px; top: 47px;"><img src="Buddhism.jpg" width="315" height="270" align="left"></div>Budismul-Este astazi una dintre cele patru religii dominante din lume.-El numara intre 300 şi 400 milioane de credinciosi, care traiesc mai ales in Asia de SE.-Este o religie fara zei. Este rezultatul cautarii unei cai de eliberare a sufletului din ciclul regenerarii, de sustragere de la transmigrare.-Intemeietorul budismului, Buddha, se naste in India, la finalul sec. VI i.Hr-In aceasta epoca, toti indienii practicau hinduismul, pe care Buddha se bazeaza pentru a propovadui noua doctrina. E vorba mai mult de o intelepciune, fara zei sau texte sacre, si mai putin de o adevarata religie. </p></div><div class="wolg" style="position:absolute; left: 222px; top: 689px; width: 618px;"><p align="justify" style="margin-left: 0px; margin-top: 0px; margin-right: 0px"><font size="5"> <div style="position:absolute; left: -202px; top: -228px;"><img src="buddhist-meditation.jpg" width="300" height="224" align="right"></div>In fata discipolilor sai, cu prilejul predicii de la Benares, Buddha expune cele patru nobile adevaruri, care constituie baza doctrinei sale.El afirma intai ca lumea este doar suferinta (primul adevar). Nasterea, boala, batranetea, moartea provoaca suferinta.Durerea omului provine din atasamentul sau fata de viata si din dorinta sa, care nu poate fi niciodata satisfacuta, de a avea fericirea (al <div style="position:absolute; left: 615px; top: -96px;"><img src="buddhism-nirvana-Shakyamuni-nirvana.jpg" width="313" height="216" align="left"></div>doilea adevar).Pentru a opri suferinta si pentru a ajunge la impacare, omul trebuie asadar sa se elibereze de dorinta si sa o nimiceasca (al treilea adevar), ducand o viata exemplara.(al patrulea adevar).El defineste nirvana ca o stare de beatitudine vesnica, in care dorinta, ignoranta, timpul si suferinta nu mai exista. Cu nirvana ia sfarsit ciclul reincarnarilor succesive. <div style="position:absolute; left: 629px; top: 282px;"><img src="Buddhist_Temple_by_Scars_Stock.jpg" width="365" height="229" align="right"></div></p></div></body></html> the red parts i want to scroll below the first image that is with blue. could one div do it for both? i rlly couldnt do it myself im such a newbie. Link to comment Share on other sites More sharing options...
Ingolme Posted January 25, 2012 Share Posted January 25, 2012 The first thing to do so that your page will render properly, is to make valid HTML. Pass your code through the validator: http://validator.w3.org/ and fix any errors it shows you. Link to comment Share on other sites More sharing options...
darkbelly Posted January 25, 2012 Author Share Posted January 25, 2012 lol...thats foreign languadge for me ) Link to comment Share on other sites More sharing options...
Ingolme Posted January 25, 2012 Share Posted January 25, 2012 If your page doesn't validate, it's not going to render properly and different browsers will show things very differently. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.