DeveloperBreeze

CSS Grid

Imagine a grid like an Excel sheet.

  • Row 1 – The box starts in the first row.
  • Col Start 3 – It begins at the third column.
  • Col Span 8 – The box stretches across 8 columns (from column 3 to 10).
  • Row Span 1 – It occupies only 1 row in height.

Visual:

| 1 | 2 | [  Box  ] | 11 | 12 |

(Box starts at column 3 and spans 8 columns)

Continue Reading

Discover more amazing content handpicked just for you

Note

Commonly used English phrases and their natural spoken

No preview available for this content.

Jan 16, 2025
Read More
Note

Note on `npm run dev` in a Laravel Project

During development, assets might be split into multiple files for better organization. Laravel Mix combines and optimizes these files during the production build (npm run prod), ensuring better performance by minifying the assets.

Laravel Mix supports versioning by appending unique hashes to filenames, which is essential for cache busting. When assets are updated, browsers are forced to re-download the new versions due to the filename changes.

Oct 24, 2024
Read More
Note

Finding and Displaying Laravel Log Modification Time Using find and stat

Running the command may produce output like this:

2024-12-06 10:32:45.123456789 /var/www/project1/storage/logs/laravel.log
2024-12-05 18:25:10.987654321 /var/www/project2/storage/logs/laravel.log

Oct 24, 2024
Read More
Note

How to Completely Uninstalling Steam on Linux

No preview available for this content.

Oct 24, 2024
Read More
Note
javascript nodejs

Vite vs Webpack

No preview available for this content.

Aug 14, 2024
Read More
Note
bash

How to reset your local Git repository to match the remote repository exactly

git remote prune origin

These commands remove any remote-tracking references that no longer exist on the remote.

Aug 09, 2024
Read More
Note
javascript css +1

Automatically add Tailwind CSS and jQuery classes to any table

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Table Styling with Tailwind CSS</title>
    <!-- Include Tailwind CSS -->
    <link href="https://cdn.jsdelivr.net/npm/tailwindcss@2.2.19/dist/tailwind.min.css" rel="stylesheet">
    <!-- Include jQuery -->
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
</head>
<body>

<!-- Example table -->
<table>
    <thead>
        <tr>
            <th>Header 1</th>
            <th>Header 2</th>
            <th>Header 3</th>
        </tr>
    </thead>
    <tbody>
        <tr>
            <td>Data 1</td>
            <td>Data 2</td>
            <td>Data 3</td>
        </tr>
        <tr>
            <td>Data 4</td>
            <td>Data 5</td>
            <td>Data 6</td>
        </tr>
    </tbody>
</table>

<!-- jQuery script to apply classes -->
<script>
    $(document).ready(function() {
        $('table').each(function() {
            $(this).addClass('min-w-full bg-white border border-gray-200');
            $(this).find('thead').addClass('bg-gray-50');
            $(this).find('th').addClass('px-6 py-3 text-left text-xs font-medium text-gray-500 uppercase tracking-wider border-b border-gray-200');
            $(this).find('tbody').addClass('bg-white divide-y divide-gray-200');
            $(this).find('tr').addClass('hover:bg-gray-100');
            $(this).find('td').addClass('px-6 py-4 whitespace-nowrap text-sm text-gray-900');
        });
    });
</script>

</body>
</html>

The <link> tag includes Tailwind CSS via CDN, enabling use of utility classes.

Aug 03, 2024
Read More

Discussion 0

Please sign in to join the discussion.

No comments yet. Start the discussion!