Open In App

Blaze UI Grid

Blaze UI is an open-source, framework-free UI toolkit that provides a solid structure for quickly constructing websites with a scalable and maintainable base. It is responsive in nature since all of the components were designed to work on any screen size.

Blaze UI Grid is a necessary component for each website since it properly aligns space and improves the user interface. 



Blaze UI Grid Fixed Width is a component provided by the framework The cells of a grid will be fluid and responsive in this component. It enables us to give each grid cell a set width.

Type of Grids:



Example 1: The following code shows a basic grid that is used as a normal grid.




<!DOCTYPE html>
<html lang="en">
  
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content=
        "width=device-width, initial-scale=1.0">
    <title> Blaze UI Fixed Widths</title>
    <link rel="stylesheet" href=
</head>
  
<body>
    <h1 style="color:green">
        GeeksforGeeks
        <div class="c-heading__sub">
            Blaze UI Grids
        </div>
    </h1>
    <br>
  
    <div class="o-grid o-grid--demo">
        <div class="o-grid__cell" 
            style="border:solid black;">
            <div class="o-grid-text">first</div>
        </div>
        <div class="o-grid__cell" 
            style="border:solid black;">
            <div class="o-grid-text">second</div>
        </div>
        <div class="o-grid__cell" 
            style="border:solid black;">
            <div class="o-grid-text">third</div>
        </div>
    </div>
</body>
  
</html>

Output:

 

Example 2: The following code demonstrates the o-grid__cell–width-50 class that is used to add width to the cells.




<!DOCTYPE html>
<html lang="en">
  
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" 
          content="width=device-width, initial-scale=1.0">
    <title> Blaze UI Fixed Widths</title>
    <link rel="stylesheet" href=
</head>
  
<body>
    <h1 style="color:green">
        GeeksforGeeks
        <div class="c-heading__sub">
            Blaze UI Grids
        </div>
    </h1>
    <br>
  
    <div class="o-grid o-grid--demo" 
         style="border: solid black;">
        <div class="o-grid__cell o-grid__cell--width-50">
            <div class="o-grid-text">first</div>
        </div>
        <div class="o-grid__cell">
            <div class="o-grid-text">second</div>
        </div>
        <div class="o-grid__cell">
            <div class="o-grid-text">third</div>
        </div>
    </div>
</body>
  
</html>

Output:

 

Example 3: The following code shows demonstrate the o-grid__cell–full class that is used to add the full length of all cells.




<!DOCTYPE html>
<html lang="en">
  
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" 
          content="width=device-width, initial-scale=1.0">
    <title> Blaze UI Fixed Widths</title>
    <link rel="stylesheet" href=
</head>
  
<body>
    <h1 style="color:green">
        GeeksforGeeks
        <div class="c-heading__sub">
            Blaze UI Grids
        </div>
    </h1>
    <br>
  
    <div class="o-grid o-grid--full o-grid--demo">
        <div class="o-grid__cell" style="border:solid black;">
          <div class="o-grid-text">first</div>
        </div>
        <div class="o-grid__cell" style="border:solid black;">
          <div class="o-grid-text">second</div>
        </div>
        <div class="o-grid__cell" style="border:solid black;">
          <div class="o-grid-text">third</div>
        </div>
    </div>
</body>
</html>

Output:

 

Example 4: The following code shows demonstrate the o-grid__cell–offset-60 class that is used to push a cell across the grid horizontally.




<!DOCTYPE html>
<html lang="en">
  
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content=
         "width=device-width, initial-scale=1.0">
    <title> Blaze UI Fixed Widths</title>
    <link rel="stylesheet" href=
</head>
  
<body>
    <h1 style="color:green">
        GeeksforGeeks
        <div class="c-heading__sub">
            Blaze UI Grids
        </div>
    </h1>
    <br>
    <div class="o-grid o-grid--demo">
        <div class="o-grid__cell o-grid__cell--width-20" 
              style="border:solid black;">
            <div class="o-grid-text">first</div>
        </div>
        <div class="o-grid__cell o-grid__cell--width-20 
             o-grid__cell--offset-60" 
             style="border: solid black;">
            <div class="o-grid-text">second</div>
        </div>
    </div>
</body>
</html>

Output:

 

Example 5: This code demonstrates the nesting grid that can be used to perform nesting between two cells.




<!DOCTYPE html>
<html lang="en">
  
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content=
"width=device-width, initial-scale=1.0">
  
    <title> Blaze UI Fixed Widths</title>
    <link rel="stylesheet" href=
</head>
  
<body>
    <h1 style="color:green">
        GeeksforGeeks
        <div class="c-heading__sub">
            Blaze UI Grids
        </div>
    </h1>
    <br>
    <div class="o-grid o-grid--demo">
        <div class="o-grid__cell">
            <div class="o-grid" style="border: solid black;">
                <div class="o-grid__cell" style="border:solid black;">
                  <div class="o-grid-text">first</div>
                </div>
                <div class="o-grid__cell" style="border:solid black;">
                  <div class="o-grid-text">second</div>
                </div>
            </div>
            <div class="o-grid" style="border: solid black;">
                <div class="o-grid__cell" style="border:solid black;">
                  <div class="o-grid-text">third</div>
                </div>
                <div class="o-grid__cell" style="border:solid black;">
                  <div class="o-grid-text">fourth</div>
                </div>
            </div>
        </div>
        <div class="o-grid__cell" style="border:solid black;">
            <div class="o-grid-text">fifth</div>
        </div>
    </div>
</body>
</html>

Output:             

 

Reference: https://www.blazeui.com/objects/grid/


Article Tags :