Pen Settings

HTML

CSS

CSS Base

Vendor Prefixing

Add External Stylesheets/Pens

Any URL's added here will be added as <link>s in order, and before the CSS in the editor. If you link to another Pen, it will include the CSS from that Pen. If the preprocessor matches, it will attempt to combine them before processing.

+ add another resource

JavaScript

Babel includes JSX processing.

Add External Scripts/Pens

Any URL's added here will be added as <script>s in order, and run before the JavaScript in the editor. You can use the URL of any other Pen and it will include the JavaScript from that Pen.

+ add another resource

Packages

Add Packages

Search for and use JavaScript packages from npm here. By selecting a package, an import statement will be added to the top of the JavaScript editor for this package.

Behavior

Save Automatically?

If active, Pens will autosave every 30 seconds after being saved once.

Auto-Updating Preview

If enabled, the preview panel updates automatically as you code. If disabled, use the "Run" button to update.

Format on Save

If enabled, your code will be formatted when you actively save your Pen. Note: your code becomes un-folded during formatting.

Editor Settings

Code Indentation

Want to change your Syntax Highlighting theme, Fonts and more?

Visit your global Editor Settings.

HTML

              
                <!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Alpine Toolbox - Example - Responsive Navbar</title>
    <link
      href="https://unpkg.com/tailwindcss@^1.0/dist/tailwind.min.css"
      rel="stylesheet"
    />
    <script
      src="https://cdn.jsdelivr.net/gh/alpinejs/alpine@v2.3.5/dist/alpine.min.js"
      defer
    ></script>
  </head>

  <body class="bg-gray-300">
    <nav
      class="flex items-center justify-between flex-wrap p-6 fixed w-full z-10 top-0"
      x-data="{ isOpen: false }"
      @keydown.escape="isOpen = false"
      :class="{ 'shadow-lg bg-indigo-900' : isOpen , 'bg-gray-800' : !isOpen}"
    >
      <!--Logo etc-->
      <div class="flex items-center flex-shrink-0 text-white mr-6">
        <a
          class="text-white no-underline hover:text-white hover:no-underline"
          href="#"
        >
          <span class="text-2xl pl-2"
            ><i class="em em-grinning"></i> Brand McBrandface</span
          >
        </a>
      </div>

      <!--Toggle button (hidden on large screens)-->
      <button
        @click="isOpen = !isOpen"
        type="button"
        class="block lg:hidden px-2 text-gray-500 hover:text-white focus:outline-none focus:text-white"
        :class="{ 'transition transform-180': isOpen }"
      >
        <svg
          class="h-6 w-6 fill-current"
          xmlns="http://www.w3.org/2000/svg"
          viewBox="0 0 24 24"
        >
          <path
            x-show="isOpen"
            fill-rule="evenodd"
            clip-rule="evenodd"
            d="M18.278 16.864a1 1 0 0 1-1.414 1.414l-4.829-4.828-4.828 4.828a1 1 0 0 1-1.414-1.414l4.828-4.829-4.828-4.828a1 1 0 0 1 1.414-1.414l4.829 4.828 4.828-4.828a1 1 0 1 1 1.414 1.414l-4.828 4.829 4.828 4.828z"
          />
          <path
            x-show="!isOpen"
            fill-rule="evenodd"
            d="M4 5h16a1 1 0 0 1 0 2H4a1 1 0 1 1 0-2zm0 6h16a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2zm0 6h16a1 1 0 0 1 0 2H4a1 1 0 0 1 0-2z"
          />
        </svg>
      </button>

      <!--Menu-->
      <div
        class="w-full flex-grow lg:flex lg:items-center lg:w-auto"
        :class="{ 'block shadow-3xl': isOpen, 'hidden': !isOpen }"
        @click.away="isOpen = false"
        x-show.transition="true"
      >
        <ul
          class="pt-6 lg:pt-0 list-reset lg:flex justify-end flex-1 items-center"
        >
          <li class="mr-3">
            <a
              class="inline-block py-2 px-4 text-white no-underline"
              href="#"
              @click="isOpen = false"
              >Active
            </a>
          </li>
          <li class="mr-3">
            <a
              class="inline-block text-gray-600 no-underline hover:text-gray-200 hover:text-underline py-2 px-4"
              href="#"
              @click="isOpen = false"
              >link
            </a>
          </li>
          <li class="mr-3">
            <a
              class="inline-block text-gray-600 no-underline hover:text-gray-200 hover:text-underline py-2 px-4"
              href="#"
              @click="isOpen = false"
              >link
            </a>
          </li>
          <li class="mr-3">
            <a
              class="inline-block text-gray-600 no-underline hover:text-gray-200 hover:text-underline py-2 px-4"
              href="#"
              @click="isOpen = false"
              >link
            </a>
          </li>
        </ul>
      </div>
    </nav>

    <!--Container for content-->

    
    <div class="container shadow-lg mx-auto bg-white mt-24 md:mt-18">
      

<div class="antialiased sans-serif bg-gray-200 border-2 border-red-300">

  
                    <div class="max-w-xl mb-5">

                        <fieldset class="w-full my-3 bordered">
                            <legend>Table</legend>
<div class="overflow-x-auto">

                            <table class=" overflow-x-auto p-2 m-0 border-2 border-gray-300">
                                <thead class="bg-gray-700 border-b-2 border-t-2 border-red-300">
                                <tr>
                                    <th class="w-1/12 py-2">Id</th>
                                    <th class="w-4/12 py-2">Name</th>
                                    <th class="w-4/12 py-2">Description</th>
                                    <th class="w-1/12 py-2"></th>
                                </tr>
                                </thead>
                                <tbody>

                                <tr>

                                    <td>1</td>
                                    <td class="whitespace-nowrap">
                                        Laptops
                                        <small class="pl-2 pt-1">
                                            ( Used in 2 ad(s) )
                                        </small>
                                    </td>

                                    <td class="whitespace-nowrap p-1">Laptops description Lorem ipsum dolor sit amet,
                                        consectetur
                                        adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
                                        aliqua....
                                    </td>

                                    <td class="p-1 justify-end">
                                        <button type="button"
                                                class="flex items-center bg-blue-500 text-white hover:bg-blue-700 p-1 m-1 rounded text-sm w-auto cursor-pointer"
                                                title="Edit category">
                                            Edit
                                        </button>

                                        <button type="button" class="editor_listing_delete_btn">
                                            Del
                                        </button>
                                    </td>

                                </tr>

                                <tr>
                                    <td>2</td>
                                    <td class="whitespace-nowrap">
                                        Computer Monitor
                                        <small class="pl-2 pt-1">
                                            ( Used in 4 ad(s) )
                                        </small>
                                    </td>
                                    <td class="whitespace-nowrap	 p-1">Computer Monitor des Lorem ipsum dolor sit amet,
                                        consectetur
                                        adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna
                                        aliqua....
                                    </td>

                                    <td class="p-1 justify-end">
                                        <button type="button"
                                                class="flex items-center bg-blue-500 text-white hover:bg-blue-700 p-1 m-1 rounded text-sm w-auto cursor-pointer"
                                                title="Edit category">
                                            Edit
                                        </button>

                                        <button type="button" class="editor_listing_delete_btn">
                                            Del,
                                        </button>
                                    </td>
                                </tr>

                                </tbody>


                            </table>
  </div>
                        </fieldset>
  
</div>

</div>      
      
    </div>
    
    
    
    
  </body>
</html>
              
            
!

CSS

              
                
              
            
!

JS

              
                
              
            
!
999px

Console