SitePoint Sponsor

User Tag List

Results 1 to 7 of 7

Hybrid View

  1. #1
    PHP Developer W1LL's Avatar
    Join Date
    Apr 2001
    Location
    Leicester, UK
    Posts
    459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Form background images with CSS?

    Is it possible to set a background image on a form text box with CSS?

    - Will

  2. #2
    SitePoint Zealot nflicanada's Avatar
    Join Date
    Feb 2001
    Location
    Sk, Canada
    Posts
    150
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Check out this tutorial at edevcafe

  3. #3
    PHP Developer W1LL's Avatar
    Join Date
    Apr 2001
    Location
    Leicester, UK
    Posts
    459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Nah, that's not what I wanted. Thanks anyway, but I knew all of what was in that tut. What I was wondering was, is there a way (in CSS) to set a background image for a text box? I don't think there is; I think it's only for buttons. But if anyone has any ideas please let me know.
    Cheers,

    - Will

  4. #4
    SitePoint Enthusiast DCE's Avatar
    Join Date
    Feb 2001
    Location
    UK
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    DCE
    If everything seems to be going well, you have obviously overlooked
    something.

  5. #5
    PHP Developer W1LL's Avatar
    Join Date
    Apr 2001
    Location
    Leicester, UK
    Posts
    459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks, that's exactly what I wanted. But now I need the image not to repeat and to align to the right of the text box. Any ideas?

    - Will

  6. #6
    SitePoint Enthusiast DCE's Avatar
    Join Date
    Feb 2001
    Location
    UK
    Posts
    39
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Could you not make the image exactly the same size as the text box with white(or coloured) space to the left of the original image?
    DCE
    If everything seems to be going well, you have obviously overlooked
    something.

  7. #7
    PHP Developer W1LL's Avatar
    Join Date
    Apr 2001
    Location
    Leicester, UK
    Posts
    459
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    No, it's ok. I already worked it out. This is how it's done for anyone wondering:

    .required { background: url(gfx/arrow.gif);
    background-position: center right;
    background-repeat: no-repeat;
    background-color: #f0f0f0;
    border: 1px solid;
    border-color: #0080ff;
    font-family: verdana;
    font-size: 10px;
    color: #ff0000;
    }

    Thanks for eveyones help.

    - Will


Bookmarks

Posting Permissions

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