Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

align to right an element in jquery mobile

I've created this elements form:

<div class = "ui-grid-a">
                <div class= "ui-block-a">
                    <div data-role="fieldcontain" class = "ui-hide-label">
                        <label for="birth-place">Birth Place</label>
                        <input type="text" name="birth-place" id="birth_place" value="" placeholder="Birth Place" />
                    </div>
                </div>
                <div class = "ui-block-b">
                    <div data-role = "fieldcontain" class="ui-hide-label">
                        <label for="province">Province</label>
                        <input type="text" name="province" id="province" value="" placeholder="PR" />
                    </div>
                </div>
            </div>

and I want to align the element province to the right. How can I do that?

like image 776
eng_mazzy Avatar asked Feb 07 '12 21:02

eng_mazzy


2 Answers

Try this: <span style="float:right"><label for="province">Province</label></span> (of course you can put this also in a external css file)

like image 121
palme Avatar answered Oct 31 '22 21:10

palme


Just do the following... Apply this custom CSS to your code...

label[for="province"] { text-align:right; }

If it doesn't run they supply the label with a class name and do the following..

label.className { text-align:right; }
like image 22
SaurabhLP Avatar answered Oct 31 '22 23:10

SaurabhLP