Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

space between inline text and input items in JADE?

Tags:

pug

How to give space between inline text and input items in JADE?

div(data-role="horizontal", data-theme="a", data-overlay-theme="a", data-inline="true",class="ui-bar ui-grid-c")
                        div(class='ui-block-a')
                            div(data-role='fieldcontain')
                                label(for='memberaddress') Address Proof
                                textarea(id='memberaddress',name='memberaddress')
                        div(class='ui-block-b')
                            div(data-role="fieldcontain")
                                label(for="proof") Proof ID
                                select(name='proof', id='proof', data-theme='a', data-icon='bank', data-inline='true', data-native-menu="false")
                                    option(value='0') Select Proof
                                    option(value='1') Voter ID
                                    option(value='2') Driving Licence
                                    option(value='3') PANCARD
                                    option(value='4') Ration Card
                        div(class='ui-block-c')
                            div(data-role="fieldcontain")                           
                                input(type='checkbox', name='addressmatchedCheck', id='addressmatchedCheck', data-inline="true")
                                label(for='addressmatchedCheck') Address Matched

My output is: Attached Image is my output

I am not able to get space between label and textarea.

like image 754
Baskar Avatar asked Oct 07 '12 09:10

Baskar


Video Answer


2 Answers

add margin to your css as jonathan ong suggests, or you could add |   or span   between your label and textarea

like image 137
Pete Avatar answered Sep 28 '22 04:09

Pete


There is also the "pretty" option

You should be able to call jade like so (see http://jade-lang.com/api/):

var fn = jade.compile('string of jade', {pretty: true});

It will insert line breaks and indentations in the output between all the nodes in your template.

If you'd rather just insert this one space, an option is

label(for='memberaddress') Address Proof
=' '
textarea(id='memberaddress',name='memberaddress')
like image 40
leff Avatar answered Sep 28 '22 04:09

leff