Open In App

Bulma Responsive Alignment

Bulma Responsive Alignment is used to make your website responsive. You can choose a specific alignment for each viewport width. Simply append the viewport width to the alignment modifier.

Responsive Alignment Classes:



Note: You can use the same logic for each of the 4 alignments, you have to change the side value of the left and that can be anything left, right, justify and centered.

Example: The below example illustrate the Responsive Alignment class in Bulma






<!DOCTYPE html>
<html>
<head>    
    <link rel='stylesheet'
          href=
</head>
  
<body class="has-text-centered">
    <h1 class="is-size-2 has-text-success">
        GeeksforGeeks
    </h1>
    <b>Bulma Responsive Alignment</b>
    <br>
    <div class="container">
        <p class="has-text-left-mobile is-size-4">
           GeeksforGeeks</p>
  
        <p class="has-text-left-touch is-size-4">
           GeeksforGeeks</p>
  
        <p class="has-text-left-tablet-only is-size-4">
           GeeksforGeeks</p>
  
        <p class="has-text-left-tablet is-size-4">
           GeeksforGeeks</p>
  
        <p class="has-text-left-desktop-only is-size-4">
           GeeksforGeeks</p>
  
        <p class="has-text-left-desktop is-size-4">
           GeeksforGeeks</p>
  
        <p class="has-text-left-widescreen-only is-size-4">
           GeeksforGeeks</p>
  
        <p class="has-text-left-widescreen is-size-4">
          GeeksforGeeks</p>
  
        <p class="has-text-left-fullhd is-size-4">
          GeeksforGeeks</p>
    </div>
</body>
</html>

Output:

Reference: https://bulma.io/documentation/helpers/typography-helpers/#responsive-alignment


Article Tags :