Open Source Tutorials - Open Source Training
Open source training & tutorials from experienced, passionate people
chrome icon firefox icon ie icon opera icon safari icon Sings in these Browsers
A- A A+

By A Web Design

Welcome, Guest
Username Password: Remember me

Textarea background image not remain stable
(1 viewing) (1) Guest
All your queries regarding CSS will be solved in this forum
  • Page:
  • 1
TOPIC:

Textarea background image not remain stable

Textarea background image not remain stable 9 months ago #795

  • sami
  • OFFLINE
  • Junior Boarder
  • Posts: 24
  • Karma: 0
I'm having problem getting a background image inside a textarea. I want the image to be at the bottom-right corner of the div, and remain there even when the user scrolls around in the field.but in my case when the page scrolls the image disappears behind the rest of my layout!

Here's the code I'm working with:

Code:
<div id="container">
<textarea cols="75" rows="7" style="width: 80%; height: 120px;" name="message" tabindex="1" style="background: url(image.jpg) no-repeat;background-position:right bottom;background-attachment:fixed;"></textarea>
</div>

Re: Textarea background image not remain stable 9 months ago #796

  • shailesh
  • OFFLINE
  • Fresh Boarder
  • Posts: 4
  • Karma: 0
The same problem i faced and i got the solution by having this code. Try this, this will definately work
#container {
width:250px;
background-color:#ffffff;
background-image:url(sunshine.gif);
background-repeat:no-repeat;
background-position:175px 200px;
margin:auto;
}
#container textarea {
width:250px;
height:240px;
background-color:transparent;
color:#000000;
overflow:auto;
}
</style>
  • Page:
  • 1
Time to create page: 1.32 seconds
OSV Newsletter


Receive HTML?

NOTE: To prevent subscription to the OSV newsletter, uncheck the checkbox above.
Guest Blog for OSV
Free Ebook Download