SitePoint Sponsor

User Tag List

Results 1 to 4 of 4
  1. #1
    SitePoint Member Chainy's Avatar
    Join Date
    Apr 2004
    Location
    UNITED KINGDOM
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Lightbulb unwanted space around text box.

    Hi all
    i have layed out my page using css, and i want to put a text box in an
    element. The problem i seem to have is when i put the text box in the element
    there is a space at the top of the text box. i want it to fit snug, same size as the text box, which i cannot seem to make happen. There is no padding or margin values set, if i insert an image say 25px high there is no poblem set the height of the element to 25px and thats fine, just as i want it, soon as the text box goes in i get the unwanted space at the top or bottom. Any ideas would be appriceated.
    Chainy

  2. #2
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Can you post some code?

  3. #3
    SitePoint Member Chainy's Avatar
    Join Date
    Apr 2004
    Location
    UNITED KINGDOM
    Posts
    8
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi Vinnie
    Here is the code for the divs i am trying to put the text box in?

    <DIV ID="inset"><INPUT TYPE="text" VALUE="search:" />

    <a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('Go1','','images/search2.gif',1)"><img src="images/search.gif" alt="Go " name="Go1" width="50" height="25" hspace="8" border="0" id="Go1" /></a></DIV>

    and here is the css attrubutes for the div!

    #inset {
    width: 100%;
    background-image: url(../images/inset.gif);
    text-align: right;
    }

    as you can see i have a small image in the div as a rollover and on its own its fine, but when i add the textbox it makes the element grow in height.

  4. #4
    ☆★☆★ silver trophy vgarcia's Avatar
    Join Date
    Jan 2002
    Location
    in transition
    Posts
    21,236
    Mentioned
    1 Post(s)
    Tagged
    1 Thread(s)
    Try setting the textbox's margins to zero. Good luck though; form fields are very difficult to style consistenly cross-browser.


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
  •