SitePoint Sponsor

User Tag List

Results 1 to 10 of 10

Thread: Styling forms

  1. #1
    SitePoint Addict
    Join Date
    Mar 2005
    Location
    Toronto
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Styling forms

    I am having serious trouble with styling forms. My aim is to use images to replace textboxes and submit button, the submit button can be done properly, however the textbox does not, can someone offer an article that explains this or give me a few pointers please. Thx.

  2. #2
    SitePoint Wizard bronze trophy bluedreamer's Avatar
    Join Date
    Jul 2005
    Location
    Middle England
    Posts
    3,349
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)
    You can't use an image for a textbox - where would people type in their text?

  3. #3
    SitePoint Addict
    Join Date
    Mar 2005
    Location
    Toronto
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I was thinking about using css to set the background image of a textbox, however, this is when the problem comes, IE and firefox seems to render the width differently...even though I specified it...

  4. #4
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,746
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kefeso
    I was thinking about using css to set the background image of a textbox, however, this is when the problem comes, IE and firefox seems to render the width differently...even though I specified it...
    Yeah IE leaves space for the scroll-bar and FireFox doesn't... or it might be the other way around, I can't remember.

    Why does this affect your background, though??

  5. #5
    SitePoint Addict
    Join Date
    Mar 2005
    Location
    Toronto
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://beefthing.be.funpic.org/css/form.html
    here is what I mean, in firefox, the width of the textbox is perfectly set at 123px with 1px border, so 125px is correct. However, in IE, the total width is about 127px... this is annoying the heck out of me. Anyone have a fix for this?

  6. #6
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,746
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kefeso
    http://beefthing.be.funpic.org/css/form.html
    here is what I mean, in firefox, the width of the textbox is perfectly set at 123px with 1px border, so 125px is correct. However, in IE, the total width is about 127px... this is annoying the heck out of me. Anyone have a fix for this?
    Hell, just use conditional comments to fix the IE forms

  7. #7
    SitePoint Addict
    Join Date
    Mar 2005
    Location
    Toronto
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah HA, I found the solution, by applying padding: 0px; the form shows up correctly for both IE and firefox with the specified pixel: http://beefthing.be.funpic.org/css/form.html

  8. #8
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,746
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kefeso
    Ah HA, I found the solution, by applying padding: 0px; the form shows up correctly for both IE and firefox with the specified pixel: http://beefthing.be.funpic.org/css/form.html
    Cool !!... Good for you, dude!!

  9. #9
    SitePoint Addict
    Join Date
    Mar 2005
    Location
    Toronto
    Posts
    378
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by Shaun(OfTheDead)
    Cool !!... Good for you, dude!!
    hehe, thx. Thx for your suggestion for the conditional comment though, I'll be using it for other areas

  10. #10
    Keep Moving Forward gold trophysilver trophybronze trophy
    Shaun(OfTheDead)'s Avatar
    Join Date
    Nov 2005
    Location
    Trinidad
    Posts
    3,746
    Mentioned
    45 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by kefeso
    hehe, thx. Thx for your suggestion for the conditional comment though, I'll be using it for other areas
    Yeah, they come in really handy... I actually have a block of them as an include so I can apply them to all my files at once.


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
  •