style.css help please (easy..)

Discussion in 'CSS' started by Joehema, May 18, 2008.

  1. #1
    Site

    Where you type in the text in the input bar, I need to know how i can make the text start more to the right.

    [​IMG]

    Thanks.
     
    Joehema, May 18, 2008 IP
  2. rpjs

    rpjs Peon

    Messages:
    39
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Did you mean Left? if so then you can use:

    text-align:left;
    padding-left:20px;

    Change 20px to whatever padding you need.
     
    rpjs, May 18, 2008 IP
  3. deathshadow

    deathshadow Acclaimed Member

    Messages:
    9,732
    Likes Received:
    1,999
    Best Answers:
    253
    Trophy Points:
    515
    #3
    Well, you've got several 'problems' as I see it here. Trying to put a image background on a input is usually a miserable /FAIL/ because of all the different rendering characteristics of form inputs. Have a look at the difference of your input between FF, Opera, Safari and IE, and you'll see what I mean.

    Your best bet is going to be to null margins and padding on the input, set the line-height and height to the same value, then wrap it in a div and apply the image background and desired paddings there. It sucks to use the extra wrapper, but if you want to have interaction between an image and an input, without it breaking cross-browser that's likely your only real option.

    You might want to clean up some of the other 'issues' in the code though... Like adding a doctype, fixing the invalid markup like the unclosed label tags, get the presentational elements out of the markup, properly nest inline-level elements inside block-levels and not the other way around, etc, etc. Valid markup is usually a good place to start with any page.
     
    deathshadow, May 19, 2008 IP