How do I align input field and submit button (also differences between: IE, FFox, Chrome)?

前端 未结 3 1637
被撕碎了的回忆
被撕碎了的回忆 2020-12-29 02:53

I am having problems styling form fields with CSS. As you can see below I am trying to get an input field and then to its right the submit button. However for some reason I

相关标签:
3条回答
  • 2020-12-29 03:24

    you should try floating them both left, that way they will position themselves.

    0 讨论(0)
  • 2020-12-29 03:31

    Here is what works for me in FF, IE8 and Chrome on XP

    #subscribe_email {
        border: solid 1px #CCC;
        height: 21px;
        width: 250px;
        font-size: 15px;
        color: #999;
        padding-left: 5px;
        vertical-align: bottom
    }
    
    #subscribe_submit {
        border: solid 1px #CCC;
        height: 25px;
        width: 115px;
        color: white;
    }
    

    I removed CSS on the #form_box div, set vertical-align:bottom and tweaked the height on text box.

    0 讨论(0)
  • 2020-12-29 03:34

    before aplying any css make all margin and padding zero by default all browser as thr own margin and padding by making it zero and then applying ur style it affects eventually

    0 讨论(0)
提交回复
热议问题