开发者

Adding a Large text box to a page

开发者 https://www.devze.com 2023-01-15 23:28 出处:网络
I am building a page where I want to add a HUGE text entry box.Just like开发者_StackOverflow this:

I am building a page where I want to add a HUGE text entry box. Just like开发者_StackOverflow this:

http://unbouncepages.com/real-time-texts/

I have done normal text fields before, but how do I get the box and font size to be massive?


Try these CSS-Settings:

#myLargeTextboxId {
  font-size:33px;
  height:33px;
  left:0;
  line-height:33px;
  padding:8px 8px 7px;
  top:0;
  width:224px;
}


html:

<input type='text' id='my-text-box' value="Default text" />

css:

#my-text-box {
    font-weight: bold;
    font-size: 18px; /* or larger */
    height: 2em; /* or larger */
    width: 400px; /* or larger */
}


Simply upping the font-size should do it, but you probably want some padding in there as well. A massive font with no padding would look quite silly.

FireBug is your friend. Use it on everything you have never seen before and learn.


I inspected the element and it shows this:

<input name="phone_number" class="text" id="phone_number" style="padding-bottom: 7px; line-height: 33px; padding-left: 8px; width: 224px; padding-right: 8px; height: 33px; font-size: 33px; top: 0px; padding-top: 8px; left: 0px;" type="text"/>
0

精彩评论

暂无评论...
验证码 换一张
取 消