Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Text input rendering issue with Twitter Bootstrap

I'm trying to use Twitter's bootstrap for a quick few pages. I'm having problems getting text fields to render like they do at http://twitter.github.com/bootstrap/

My HTML looks like

<div class="clearfix">
    <label for="unit">unit</label>
    <div class="input">
       <input class="xlarge" id="unit" name="unit" type="text" value="" />
    </div>
</div>

Which seems to be all of the relevant CSS classes that I see on the demo page. However, my text input fields render with the input area too small vertically, so the cursor and text overlap with the bottom border of the input area. This is with latest chrome on win7.

enter image description here

like image 474
totowtwo Avatar asked Aug 25 '11 19:08

totowtwo


2 Answers

This behavior is also triggered when the doctype is wrongly typed. In my case, <!DOCTYPE> (wrong) was fixed to <!DOCTYPE HTML> and the problem went away.

like image 124
Hanne Olsen Avatar answered Oct 17 '22 09:10

Hanne Olsen


http://twitter.github.com/bootstrap/scaffolding.html

Requires HTML5 doctype Bootstrap makes use of HTML elements and CSS properties that require the use of the HTML5 doctype. Be sure to include it at the beginning of every Bootstrapped page in your project.

<!DOCTYPE html>
<html lang="en">
  ...
</html>
like image 9
Jason Avatar answered Oct 17 '22 08:10

Jason