SitePoint Sponsor

User Tag List

Results 1 to 9 of 9
  1. #1
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Editing text inside an input box

    I have a search box (input text type). The text inside of it is not aligned properly. How do I edit the text alignement (vertical and horizontal) inside the box without editing the box parameters?

    Setting padding modifies the actual box and not just the text.

    Here is a screenshot: http://www.eciad.ca/~enaverniouk/searchbox.jpg

    Thanks

  2. #2
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use left and right padding for horizontal, but for vertical, try vertical-align. Failing that, we'd need to see some code.

  3. #3
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    If I set padding to the input box it will stretch the width and height of the box itself as well as the text's padding, which is of no good to me.

    Any other ideas?

  4. #4
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by globex
    Any other ideas?
    Not without a look at some actual code.

  5. #5
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Not too sure how the code's going to help you here, its just an input box:

    HTML Code:
    <input type="text" size="30" name="keywords" onfocus="this.value=''" value="Enter words to search..." style="font-size: 10px;"/>

  6. #6
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You've posted this in the CSS forum, so presumably you want help with your CSS. Given that, don't you think a look at your stylesheet might be helpful?
    Better still, how about a link to the page?

  7. #7
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    http://forums.globexdesigns.com/index.php

    You'll need to register though. IAnd select the "EliteForce" skin from the skin chooser on the bottom of the site.

  8. #8
    SitePoint Wizard bronze trophy Tyssen's Avatar
    Join Date
    Oct 2005
    Location
    Brisbane, QLD
    Posts
    4,067
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    You can use padding; just reduce the width and height of your inputs by the amount of padding you add, so if you add 5px padding top and bottom, reduce the height by 10px.

  9. #9
    SitePoint Member
    Join Date
    Oct 2006
    Posts
    5
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Brilliant. Thanks.


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
  •