📱💻 Container | Tailwind CSS for Beginners

แชร์
ฝัง
  • เผยแพร่เมื่อ 31 ม.ค. 2025

ความคิดเห็น • 8

  • @OliverPomarejos
    @OliverPomarejos 16 วันที่ผ่านมา

    what is the name of the vs theme?

    • @sashank_gl
      @sashank_gl  15 วันที่ผ่านมา

      It's "Solarized Light", a built-in theme for VS Code.

  • @WebDeveloper-xs4uf
    @WebDeveloper-xs4uf 5 หลายเดือนก่อน

    Hi Sashank, how are you doing. How do I set screen width to not full screen on a device bigger than a MacBook 16" and for a 27" iMac as the webpage goes right to the edge of the screen. I like the video series.

    • @sashank_gl
      @sashank_gl  5 หลายเดือนก่อน +1

      Hi! I'm doing well, thanks for asking. I'm glad you're enjoying the video series!
      To prevent your webpage from stretching to the edge on larger screens like a 16" MacBook or a 27" iMac, you can use the `max-w-screen-2xl` class, which sets the maximum width to 1536px and prevents it from going beyond that width. Combined with `container` and `mx-auto`, this keeps your content centered and adjusts the max width automatically for smaller screens.
      Here's an example of how you can implement it:
      HTML:
      content here
      Hope this helps!

    • @WebDeveloper-xs4uf
      @WebDeveloper-xs4uf 5 หลายเดือนก่อน

      Is it normal to have the screen fully showing on iMac?

    • @sashank_gl
      @sashank_gl  5 หลายเดือนก่อน +1

      Yes, by default, websites typically stretch to fill the full width of the screen on any device, including iMacs. This is normal behavior. However, if you want to prevent that, you can follow the steps mentioned above.

  • @parenteseswebdev
    @parenteseswebdev 5 หลายเดือนก่อน

    What about using config file for repetive margings and padding and same classes. Can this be done.

    • @sashank_gl
      @sashank_gl  5 หลายเดือนก่อน +1

      Yes, you can definitely do that! Keeping this video in mind, you can set up your container in `tailwind.config.js` to center automatically, apply padding, and add margins as well. This is useful if you want a consistent look across your project.
      Here’s an example:
      module.exports = {
      theme: {
      container: {
      center: true,
      padding: '2rem',
      margin: '1rem',
      },
      },
      }