Div Not Responding to Width CSS

In the process of creating a form, and I want the text labels to all be the same width. For some reason that I cannot discern, using width is not working as in:

.form-label {  display:inline; width: 160px; }

<div class="form-label required">First Name:</div>

Jsfiddle

How can I get the .form-label class to respond to the width declaration? Thank you!

Answers


Change it from display:inline to display:inline-block.


Object position as inline have no width attribute, i think you are looking for inline-block;


Need Your Help

Jquery and PhoneGap - redirect before executing all sql transactions

jquery sqlite cordova mobile

I am having problems with a piece of code that reads records from a table and inserts data in another table. It doesn't execute all the sql transactions.

recursive factorial function

python recursion factorial

how can I combine these two functions in to one recursive function to have this result: