How to create two column grid and two column layout using jQuery Mobile ? Last Updated : 02 Mar, 2022 Comments Improve Suggest changes Like Article Like Report jQuery Mobile provides CSS-based columns that are responsive. The grids have a width of 100%, grids do not have a background color, border, and padding. The grids contain elements in them, these elements can be made float side-by-side using the ui-block-a or ui-block-b or ui-block-c or ui-block-d class. Columns in a grid are of equal width. In 2 column grid, both grid widths will be 50% each. For styling, we can use the ui-bar class. CDN Links: <link rel="stylesheet" href="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" /> <script src="http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"></script> Approach: Add the above CDN links to the HTML page.In the body, create a div element with the class as ui-grid-a.In div element, create two div elements with the class as ui-block-a for first div and class as ui-block-b for the second div.Set the line-height of the body as 0. Example 1: HTML <!DOCTYPE html> <html> <head> <link rel="stylesheet" href= "http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" /> <script src= "http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"> </script> <style> body { line-height: 0 !important; } </style> </head> <body> <div class="ui-grid-a"> <div class="ui-block-a"> <div class="ui-bar ui-bar-a" style="height:50px"> <p>Column 1</p> </div> </div> <div class="ui-block-b"> <div class="ui-bar ui-bar-b" style="height:50px"> <p>Column 2</p> </div> </div> </div> </body> </html> Output: Example 2: The following code demonstrates the submit and cancel buttons which are very common buttons in the internet world. HTML <!DOCTYPE html> <html> <head> <link rel="stylesheet" href= "http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.css" /> <script src= "http://code.jquery.com/mobile/1.4.2/jquery.mobile-1.4.2.min.js"> </script> <style> fieldset { border: 0; } .submit { background-color: rgb(38, 134, 158); } .cancel { background-color: rgb(233, 155, 10); } </style> </head> <body> <fieldset class="ui-grid-a"> <div class="ui-block-a"> <a class="ui-btn cancel">CANCEL</a> </div> <div class="ui-block-b"> <a class="ui-btn submit">SUBMIT</a> </div> </fieldset> </body> </html> Output: Comment More infoAdvertise with us Next Article How to create two column grid and two column layout using jQuery Mobile ? P pulamolusaimohan Follow Improve Article Tags : Web Technologies JQuery Geeks Premier League Geeks-Premier-League-2022 jQuery-UI jQuery-Questions +1 More Similar Reads How to create a Grid icon using jQuery Mobile ? jQuery Mobile is a web-based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops. In this article, we will be making a Grid icon using jQuery Mobile. Approach: First, add jQuery Mobile scripts needed for your project. <link rel="stylesheet" hr 1 min read How to create five-column grid in jQuery Mobile ? Grids in jQuery Mobile are elements that have 100% width and are completely invisible having no borders, backgrounds, padding, or margins. Inside the grid container, the elements are assigned the classes with the names ui-block-a/b/c/d/e. This makes each "block" element appear in the form of a grid 1 min read How to Create a Basic Two-Column Layout using Bootstrap 5 ? To create a basic two-column layout using Bootstrap, first, we have to enclose your content within a container, then create two divs with classes like col or col-xx, where xx represents the breakpoint for responsive behavior. Place your content inside these columns, and Bootstrap will handle the lay 3 min read How to create Horizontal selects controlgroups using jQuery Mobile ? jQuery Mobile is a web-based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops. In this article, we will be making a Horizontal selects controlgroups button using jQuery Mobile. Approach: First, add jQuery Mobile scripts needed for your project 1 min read How to create Basic footer markup using jQuery Mobile ? jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be making Basic footer markup using jQuery Mobile. Approach: First, add jQuery Mobile scripts needed for your project. <link rel=âstylesh 1 min read How to create Basic collapsibles using jQuery Mobile ? jQuery Mobile is a web-based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops. In this article, we will be making a Basic collapsible using jQuery Mobile. Approach: First, add the jQuery Mobile scripts needed for your project. <link rel="st 1 min read How to create Mini Horizontal Selects controlgroup using jQuery Mobile ? jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be making a Mini horizontal selects controlgroups button using jQuery Mobile. Approach: First, add jQuery Mobile scripts needed for your pro 1 min read How to create Grouped button footer using jQuery Mobile ? jQuery Mobile is a web based technology used to make responsive content that can be accessed on all smartphones, tablets and desktops. In this article, we will be making Grouped button footer using jQuery Mobile. Approach: First, add jQuery Mobile scripts needed for your project. <link rel=âstyle 1 min read How to create Mini Horizontal Radio button controlgroups using jQuery Mobile? jQuery Mobile is a web-based technology used to make responsive content that can be accessed on all smartphones, tablets, and desktops. In this article, we will be making a Mini Horizontal Radio button control groups button using jQuery Mobile. Approach: First, add jQuery Mobile scripts needed for y 1 min read How to Create a 2-Column Layout Grid with CSS? Creating a two-column layout is a common design pattern used in web development. This layout helps to organize content efficiently and is used across various types of websites. A 2-column layout divides the webpage into two sections, which can be useful for creating sidebars, main content areas, or 4 min read Like