Tailwind CSS Tutorial #4 - Margin, Padding & Borders

แชร์
ฝัง
  • เผยแพร่เมื่อ 27 ส.ค. 2024
  • Hey gang, in this tailwind css tutorial we'll take a look at utility classes for applying margin, padding & borders to elements.
    🐱‍👤🐱‍👤 JOIN THE GANG -
    / @netninja
    ----------------------------------------
    🐱‍💻 🐱‍💻 My Udemy Courses:
    + Modern JavaScript - www.thenetninj...
    + Vue JS & Firebase - www.thenetninja...
    + D3.js & Firebase - www.thenetninj...
    🐱‍💻 🐱‍💻 Course Files:
    + github.com/iam...
    + Full html template - github.com/iam...
    🐱‍💻 🐱‍💻 Other Related Free Courses:
    + • HTML & CSS Crash Cours...
    Download node.js - nodejs.org/en/
    Get VS Code - code.visualstu...

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

  • @BloodBunn
    @BloodBunn 8 หลายเดือนก่อน +3

    for those whose changes don't work, add --watch to your build-css in package.json, like this:
    "build-css": "tailwindcss build src/styles.css -o public/styles.css --watch"
    then in the terminal:
    npm run build-css
    this way you only need to run it once.

    • @arminmesic7273
      @arminmesic7273 7 หลายเดือนก่อน +2

      Thanks. This is why i hate tailwind. Because of this setup. Why should i always do this..... Couldn´t it be an extension, that work global within vscode which once installed. And can be called if you want to work with it...

    • @lovishsingla3681
      @lovishsingla3681 7 หลายเดือนก่อน

      still not working bro

    • @BloodBunn
      @BloodBunn 7 หลายเดือนก่อน

      @@lovishsingla3681 just use CDN for now, bro. Good for practice.

    • @lynako-as8448
      @lynako-as8448 21 วันที่ผ่านมา

      @@lovishsingla3681 for me it worked when i did this in my package.json : "scripts": {
      "build-css": "tailwindcss build -i src/styles.css -o public/styles.css",
      "watch-css": "tailwindcss build -i src/styles.css -o public/styles.css --watch"
      }
      and also in my tailwind.config.js (not the default one) : content: [ './public/**/*.{html,js}', './src/**/*.{html,js}', './index.html'],

  • @YahiaHegazy
    @YahiaHegazy 3 ปีที่แล้ว +5

    I know that when I come to this channel that I am going to learn. Thank you for posting these videos and even updating them.

  • @waifufx
    @waifufx 2 ปีที่แล้ว +1

    Expectations ALWAYS fulfilled when on this channel

  • @Arya20012
    @Arya20012 3 หลายเดือนก่อน

    Whenever i visit this channel and hear your voice , it give make me feel pleasant and grateful 🙏🙏

    • @NetNinja
      @NetNinja  3 หลายเดือนก่อน

      Thank you so much 😀

  • @manthanpatel779
    @manthanpatel779 4 ปีที่แล้ว +2

    Thank you for your all series
    ... I am your big fan.... Sir..... Keep making videos.....🙏🙏🙏

  • @umarbekorifov1777
    @umarbekorifov1777 4 ปีที่แล้ว +7

    Hello Shaun. Thank you for all these series, they are Great! And I would like to ask, could you update your Python tutorial and add Django, please, very needed at the time 🙏. Once more, thank you for your effort in making every single tutorial :)

  • @michaelkamau9565
    @michaelkamau9565 4 ปีที่แล้ว +2

    Amazing content!!. Thank you

  • @hakangenc1
    @hakangenc1 4 ปีที่แล้ว +5

    Thanks for the video. I wanna ask if you will be including purgecss to exclude unused css classes ?

  • @melodiousbeats8339
    @melodiousbeats8339 2 หลายเดือนก่อน

    You're just Awesome !! 😍😍

    • @NetNinja
      @NetNinja  2 หลายเดือนก่อน

      Thank you so much 😀

  • @RobMatthews21
    @RobMatthews21 ปีที่แล้ว +3

    Hi Shaun, these are the best tutorials I have ever used, thank you. I am having an issue. When I use the lesson 4 files from GitHub and run the build the output CSS file doesn't include all the classes. I am guessing I don't have something installed correctly'? Any idea what it could be?

    • @klauseba
      @klauseba ปีที่แล้ว

      I also had issues where the color and size didn't update. Just copy everything from the github since Tailwind probably changed since 2 years ago when this video was posted.

  •  10 หลายเดือนก่อน +1

    quick question, why does my page not refresh until i run the build script again?

  • @Mustafa41113
    @Mustafa41113 2 หลายเดือนก่อน

    Thank you sir

  • @bruceclark2277
    @bruceclark2277 2 ปีที่แล้ว +4

    These are great but I keep having to re-run "npm run build-css" for it to work on live server - anyone suggest why or where I can look to find out?

    • @masaruo
      @masaruo 2 ปีที่แล้ว

      npx tailwindcss -i ./src/input.css -o ./dist/output.css --watch

    • @AllaboutMyLife485
      @AllaboutMyLife485 ปีที่แล้ว

      Same with me, i need to keep command again n again

    • @boksi0527
      @boksi0527 ปีที่แล้ว

      @@AllaboutMyLife485 I am quite late but you can add this in your script.
      "watch": "tailwindcss build src/styles.css -o public/styles.css --watch"
      (which shaun have already explained ) and then run the comand npm run watch.

    • @user-lz2wf5dz2f
      @user-lz2wf5dz2f 2 หลายเดือนก่อน

      @@boksi0527 He didn't explain that at all pos.

  • @kashmirtechtv2948
    @kashmirtechtv2948 3 หลายเดือนก่อน

    What if we want to add custom color?

  • @kibromhs7566
    @kibromhs7566 ปีที่แล้ว +2

    padding and margin didn't work for me

  • @kashmirtechtv2948
    @kashmirtechtv2948 3 หลายเดือนก่อน

    How can we do global styling in tailwind?

  • @suzannehunter6923
    @suzannehunter6923 2 ปีที่แล้ว

    Thanks!

  • @sththapa416
    @sththapa416 4 ปีที่แล้ว +1

    please make video on NUXT jS

  • @Shakeel714
    @Shakeel714 3 ปีที่แล้ว

    Thanks a lot Shaun for all the wonderful videos

  • @Alex-xw5bc
    @Alex-xw5bc 4 ปีที่แล้ว +1

    You should make some videos with Vue and tailwind they make a great pair

  • @newpheeraphat5495
    @newpheeraphat5495 2 ปีที่แล้ว

    Thank god, You saved me.

  • @KenAdams-sn8yd
    @KenAdams-sn8yd 5 หลายเดือนก่อน +3

    anyone watching in 2024

  • @emmanuelibiyemi5607
    @emmanuelibiyemi5607 2 หลายเดือนก่อน

    You didn't drop the link to the tailwind css but nice tuts thou

  • @SephoraALAYE
    @SephoraALAYE 7 หลายเดือนก่อน

    Thanks you !!! :)

  • @AMBRISHPATIL
    @AMBRISHPATIL 3 ปีที่แล้ว

    Hello sir I love your teaching way.
    Why not start hubspot tool for web development

  • @hyperpakol
    @hyperpakol ปีที่แล้ว

    Great content

  • @ansarqazi4377
    @ansarqazi4377 2 ปีที่แล้ว

    Pro level!

  • @elgs1980
    @elgs1980 3 ปีที่แล้ว +1

    What is the font you are using for the recipes site?

    • @waifufx
      @waifufx 2 ปีที่แล้ว +1

      Nunito

  • @MohamedHamdy-qo2fs
    @MohamedHamdy-qo2fs ปีที่แล้ว

    for each change i make i need to rebuild the CSS why?

  • @madd5
    @madd5 4 ปีที่แล้ว +1

    unless Tailwind can be applied to repetitive sections at once it is useless. It's just a shortcut for pure css and would be useless.
    Can you create your own css class which will contain several Tailwind classes?

    • @andrewgad6746
      @andrewgad6746 4 ปีที่แล้ว +1

      Yes using '@apply'

    • @tanzimibthesam5861
      @tanzimibthesam5861 4 ปีที่แล้ว +1

      Yup use postcss cli npm run watch .heading{ @apply size-2xl font-bold text-blue-500 } if you need help I can help you

    • @NetNinja
      @NetNinja  4 ปีที่แล้ว +7

      Hey, I cover this later on using the @apply directive.

    • @madd5
      @madd5 4 ปีที่แล้ว +1

      @@NetNinja got it. Thanks :)

  • @aifsssm
    @aifsssm 3 ปีที่แล้ว +1

    Alright then gang.

  • @inovexa4039
    @inovexa4039 4 ปีที่แล้ว +1

    Master ur voice has changed alot..😬😬❤

  • @venkat1370
    @venkat1370 ปีที่แล้ว

    Can't open live server anyone pls help?

  • @medcherif8946
    @medcherif8946 4 ปีที่แล้ว

    Thank you

  • @EllisEnobun
    @EllisEnobun 3 ปีที่แล้ว +5

    A linear approach would be better. Start from the top and progressively go downward. The approach of adding style randomly; at the top, then scroll down to the bottom, back to top, then the middle is very uninspiring. It's better to start with the nav, the links, logo, etc, finish with that, then move to the main, finish with that, then move on. Styling bits and pieces of the nav, main, img, back to link, it is just too uninspiring for me.

    • @vedanthbaliga7686
      @vedanthbaliga7686 3 ปีที่แล้ว +2

      for a project I agree it would be a good idea. This playlist is more like a walk through and its better this way

  • @ravi_sorathiya
    @ravi_sorathiya 4 ปีที่แล้ว

    Laravel more tutorial request ninja please

  • @Pareshbpatel
    @Pareshbpatel 4 หลายเดือนก่อน

    {2024-04-18}

  • @official.mhm13
    @official.mhm13 4 ปีที่แล้ว

    1st

  • @rajbannasa7662
    @rajbannasa7662 ปีที่แล้ว

    thank you so much sir