This could be a truly basic question yet… I was only wondering if there seems to be anyway to fixed a background powering a text area/box (ie. a frame) which will stay static whilst text scrolls more than it. If therefore, how
Yep, you need to use the CSS:
#divWithBackground background-image: url('images/background. png'); background-attachment: unchanging;
That must do it
Also, let me know should you not know CSS, in which case further explanation is order.
With thanks! I know extremely basically what CSS is although not enough to know what exactly you are dealing with. Could you sophisticated… It would end up being really appreciated.
With thanks again.
Just what exactly his code may is take the particular image at " images/background. png" and puts it because background image around the element named " divWithBackground". The background-attachment aspect makes the image static in order that it won’t move while you scroll the internet page.
For scrolling apply:
#divWithBackground background-image: url('images/background. png'); background-attachment: unchanging; width: 100px; top: 100px; overflow: car;
with the following html
< div id=" divWithBackground" > < p> sometext< /p> < p> sometext< /p> < p> sometext< /p> < p> sometext< /p> < p> sometext< /p> < p> sometext< /p> < p> sometext< /p> < p> sometext< /p> < /div>
You are able to use overflow: scroll rather than auto, but auto only puts around the scroll bars as long as they are needed when scroll puts them on continuously.
Damn everyone all for beating me to the idea! Or, rather, damn me for being asleep!: -P
What Rince put up was essentially what I had been going for.
Furthermore, if you would like to set such a background to the page, use body’ besides #divWithBackground’ — this can set the properties within the body of the page instead of a specific element for instance a div.
Eventually, the overflow little bit is optional. Flood: auto; will set it to ensure the div is at the height you specify. If you would like the entire page to expand and the div (i. electronic., if you do not want the div to have a set height), then you do not need overflow: auto; (nor do you need the height: directive).
With thanks everyone!
I’ve a funny sensation that I’ll possibly be back here after with more concerns but until and then…
That’s exactly what we’re here with regard to.