I’m currently working on a page and it’s almost finished. But there’s one thing, that bothers me. I’ve got a content div (670x400px) with a scrollbar and lots of text and pictures. When I scroll, sometimes the text is cut in halfs and on the edge there is a line half letters left. I’ve attached an image of what I mean.
http://imageshack.us/photo/my-images/195/unbenannt1fll.jpg/
What I would like to do now is to put let the edge fade out. I thought of some ideas like putting a white gradient there or transparency or something with jquery and searched several words put I didn’t find anything useful and I’m too bad to think of something myself. I hope you can understand my problem and help me maybe.
EDIT:
I’ve added a (photoshopped) picture of what I would like to create.
Apologies for the formatting but here is the relevant css for a background gradient from white to transparent. That should do what you need.
Edit
It’s possible do do this without adding a second element by using the
:beforepseudo-element positioned absolutely within your containing div. This will not work though in IE7. Here’s a fiddle to demonstrate