Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Senior Coder Morgoth's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada Remaining Brain Cells: 6
    Posts
    1,402
    Thanks
    2
    Thanked 1 Time in 1 Post

    Text Box BackGround Static.

    Inside of my text box CSS code, I have set a background image for some visual effects

    .Mytextbox {
    ...
    background-image: url(/images/box_shadow.png);
    ...
    }

    Now, my question is, how can I get this background image to be static, so that when I scroll my text areas the background stays still and doesn't move, just the text moves.

    Is it possible?

    Thanks for your help.

    Edit: Topic Name Didn't Fix - I tried. "TEXT"

  • #2
    Regular Coder
    Join Date
    Dec 2002
    Location
    Minneapolis, MN
    Posts
    208
    Thanks
    0
    Thanked 1 Time in 1 Post
    background-attachment: fixed;

    or even shorter -

    background: url(image.jpg) fixed;
    anthony

  • #3
    Senior Coder coothead's Avatar
    Join Date
    Jan 2004
    Location
    chertsey, a small town 25 miles south west of london, england.
    Posts
    1,695
    Thanks
    0
    Thanked 232 Times in 227 Posts
    Hi there Morgoth,

    Try it like this....

    .Mytextbox
    {
    background:url(/images/box_shadow.png) fixed;
    }

    cthead

  • #4
    Senior Coder Morgoth's Avatar
    Join Date
    Jun 2002
    Location
    Ontario, Canada Remaining Brain Cells: 6
    Posts
    1,402
    Thanks
    2
    Thanked 1 Time in 1 Post
    Originally posted by ez4me2c3d
    background-attachment: fixed;

    or even shorter -

    background: url(image.jpg) fixed;
    Originally posted by coothead
    Hi there Morgoth,

    Try it like this....

    .Mytextbox
    {
    background:url(/images/box_shadow.png) fixed;
    }

    cthead
    Thank you both.
    It worked.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •