How can I add an input text field across two columns in a three-column ui-grid layout (33/33/33%)?
The goal is that the input text field takes 66% and the third column occupies the rest.
Example ui-grid from jquery mobile:
<div class="ui-grid-b">
<div class="ui-block-a">Block A</div>
<div class="ui-block-b">Block B</div>
<div class="ui-block-c">Block C</div>
</div><!-- /grid-a -->
simply overwrite the width property:
.ui-grid-a .ui-block-a { width: 65% }
.ui-grid-a .ui-block-b { width: 35%; }
http://forum.jquery.com/topic/unequal-layout-grids-columns-or-colspan-like-behavior
You could use:
<div class="ui-grid-b">
<div class="ui-block-a ui-block-span2">
Block A+B
</div>
<div class="ui-block-c">
Block C
</div>
</div>
You need to add the CSS below to achieve this. This could be used with any jqm grid layout simply adding the class ui-block-span* the your div blocks.
.ui-grid-b > .ui-block-span2 {
width: 66.6666%;
}
.ui-grid-c > .ui-block-span2 {
width: 50%;
}
.ui-grid-c > .ui-block-span3 {
width: 75%;
}
.ui-grid-d > .ui-block-span2 {
width: 40%;
}
.ui-grid-d > .ui-block-span3 {
width: 60%;
}
.ui-grid-d > .ui-block-span4 {
width: 80%;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With