Top 10 CSS Tricks You Didn't Know!

Поділитися
Вставка
  • Опубліковано 9 лис 2024

КОМЕНТАРІ • 592

  • @RobertoSanchezGoogle
    @RobertoSanchezGoogle 4 роки тому +585

    Topics:
    1. 1:36 - Pointer-events:all
    2. 5:38 - Block vs Inline
    3. 11:15 - Margin auto to center
    4. 12:21 - Line-height to center text
    5. 12:31 - p::selection and p::first-letter
    6. 14:08 - Ancla with smoth scroll
    7. 15:46 - Invert the colors on the screen
    8. 18:18 - Adapt text on risize
    9. 19:45 - Doble box-shadow
    10. 21:55 - Text Gradient

    • @jakem9519
      @jakem9519 4 роки тому +2

      Roberto Sanchez what do you mean? Like this is stuff to go on a resume?

    • @danpalu2308
      @danpalu2308 4 роки тому +7

      Go away Roberto

    • @dharmang
      @dharmang 4 роки тому +1

      @@jakem9519 learn english first. the word can be used in different contexts.

    • @jakem9519
      @jakem9519 4 роки тому +2

      Dharmang Learn English? The one who posted the comment really had no context to go off of, so if you have nothing constructive to say, fuck off snowflake.

    • @FordExplorer-rm6ew
      @FordExplorer-rm6ew 4 роки тому +1

      Thenkg u

  • @developedbyed
    @developedbyed  5 років тому +157

    The Creative HTML5 and CSS course is officially launching on December the 4th!
    Thanks so much for all the wonderful support this year and hopefully next year we can do several other courses including javascript, ui design and more!

    • @sunnydhama
      @sunnydhama 5 років тому

      $20? udemy courses for $5 and skillshare for $10 for a month for 1000s of courses

    • @SahraClayton
      @SahraClayton 5 років тому

      will you make a full javascript course

    • @nekotrecixxx6019
      @nekotrecixxx6019 5 років тому +3

      20 is not much.... if he is doing this on yt imagine what will u learn for 20$

    • @developedbyed
      @developedbyed  5 років тому +10

      @@nekotrecixxx6019 12hours of jam packed content! Its going to be great! Thank you!

    • @jurygregorio974
      @jurygregorio974 5 років тому +2

      Where can i buy it?

  • @BosskFett88
    @BosskFett88 4 роки тому +32

    He makes learning so much fun. Anyone can be an instructor, but not everyone can teach. He teaches by using enthusiasm and a love for the material. Thanks

    • @sypo_x1891
      @sypo_x1891 4 роки тому +1

      true asf .. i really don't understand why all instructors in universitys must be very lazy boring teachers

    • @ProgrammingWithTSH
      @ProgrammingWithTSH 2 роки тому

      ua-cam.com/video/UZgBTXJenbg/v-deo.html

  • @normaneshuchi5474
    @normaneshuchi5474 5 років тому +522

    I knew all these tricks back when Michael Jackson was still trying to setup his clothing store... Billie Jeans
    For real though, great video!!!!

  • @denns0r
    @denns0r 5 років тому +48

    btw: using display: inline-block (or even inline-flex) will give you the benefits of inline and block... takes only the space thats needed, but takes margin, height and stuff... great vid (as usual 🙂)

  • @alexanderschirmer4593
    @alexanderschirmer4593 4 роки тому +65

    1:28 "I might smile right now but I am actually in pain"
    Yeah, same here.

  • @SeanClaDesigns
    @SeanClaDesigns 5 років тому +12

    $20 for the course!?!? That is an insane price. I hope everyone picks it up. I know I will. Dev Ed you da best boi!

    • @danpalu2308
      @danpalu2308 4 роки тому +2

      Why, when you can get a 40 hour ("aour" not "haour") course on udemy for $9

    • @SeanClaDesigns
      @SeanClaDesigns 4 роки тому +3

      Dan Palu I took the course. It was great the way he explained everything easily and he is an engaging teacher. I felt I leaned a lot and maybe I could get that from udemy but I was entertained along the way as well. If you need to learn the concepts I suggest getting it

    • @Anto-xh5vn
      @Anto-xh5vn 4 роки тому

      @@SeanClaDesigns Different tastes

  • @Tizmo-tt9ry
    @Tizmo-tt9ry 5 років тому +60

    i knew all of these tricks what you mean i knew this since micheal jackson was chamona

  • @PhilSmit
    @PhilSmit 5 років тому +7

    Ed, every one of your videos makes me smile and I get to learn something new in the process.
    That's the best kind of learning in my book! 👍
    Thank you!

  • @Feninou
    @Feninou 4 роки тому +5

    The 'I am doing tha weird accent again' just killed me bro ! Self awarness = 1000% lmao

  • @dawidfrankiewicz8994
    @dawidfrankiewicz8994 4 роки тому +1

    Trick 1. You can use javascript. First animate with CSS, set timeout to same time that animation takes in javascript and it works. Also just make something that blocks user from activating script multiple times, simple i++ and i-- will work here. Using your trick element is still displayed so it takes space, if you need that space to be empty for other elements i think my trick is better here.

  • @sebastiaanvv
    @sebastiaanvv 4 роки тому

    For three months I'm learning to program as a new hobby. So yes, most of the content I did not know ;)
    I'm so happy that people like you make these enthousiastic video's and tutorials for other people to learn from. Thank you thank you!!! I hope you realise you are bringing a lot of joy and professionalism into the world by doing this.

  • @vain_za
    @vain_za 5 років тому +21

    13:48 Luckily that *L* wasn't a *D* otherwise we would just sit here in awkward silence.

  • @H1L1CH
    @H1L1CH 4 роки тому +1

    Great video! Adapting code on risizing, margin auto to center and adding gradient to the text stroke me! You are a CSS God, brother!

  • @jonyjalfon94
    @jonyjalfon94 4 роки тому

    Hey Ed i've been watching your videos for a while and i just realized how the background music makes it way more watchable and less monotone than other tutorial videos. Thank you for the amazing content and keep it up!!

  • @fandreeamihaela
    @fandreeamihaela 5 років тому +1

    You are the best!!! I cannot wait to purchase your course. I always go for free courses but I’m sure that yours will worth every penny, even if I will not learn anything new I’m happy to support you.

  • @santra528
    @santra528 4 роки тому +2

    19:40 I fell slightly asleep while watching the video then boom!! I woke up again, Thanks for the CSS tricks,

  • @gountaa
    @gountaa 5 років тому +3

    The tag with "TRAVEl" with all letter capitalized except the last one triggered me so much. The vid was very usefull tho so i guess you'll keep my sub for now. But i'm watching you.

  • @ApoLk_
    @ApoLk_ 3 роки тому

    this was the man who taught me to *center a div,* INSTANT subscribe & like & changed my life & will never forget ty ty

  • @BBlackSmitHH
    @BBlackSmitHH 4 роки тому +3

    0:28 “lets take a look at these cool pricks”😂

    • @BBlackSmitHH
      @BBlackSmitHH 3 роки тому

      @200_Percent_Coma it sounded like pricks🤷🏻‍♂️

  • @alimir5350
    @alimir5350 2 роки тому +2

    knew most of them already!! seems like I'm good at this thing 😎😎

    • @lukas.webdev
      @lukas.webdev Рік тому +1

      I just posted a new video about the Top 10 CSS Features to know and use in 2023... do you already know most of them as well? 😜

    • @alimir5350
      @alimir5350 Рік тому +2

      @@lukas.webdev nice trick bro!! I'll watch it though!!

    • @lukas.webdev
      @lukas.webdev Рік тому +1

      @@alimir5350 Thanks bro. 😉

  • @Luuck3Fire
    @Luuck3Fire 4 роки тому

    Scroll-bar behavior was the most awesome function that u show in my opnion.

  • @kaunas163
    @kaunas163 4 роки тому

    you can also use display: inline-block, to have mixed functionality between display: block and display: inline

  • @kristinac8250
    @kristinac8250 5 років тому +2

    Your teaching style makes me feel like less of an idiot. :D CSS is my least favorite. I needed all of these tricks. Thanks!

  • @youssefkossale3680
    @youssefkossale3680 5 років тому +2

    I just watched the whole video without noticing that it's 24min long !!! I enjoy your content so much keep up the hard work !! 💛 from Morocco

  • @tarunsharma5364
    @tarunsharma5364 3 роки тому

    this is the best video i've seen on youtube today.....It really made my day

  • @koko5498
    @koko5498 4 роки тому

    The last gradient explanation was the best distinction explanation of inline and block elements

  • @Danilo0717
    @Danilo0717 2 роки тому

    Ed, do you update the courses you have available for sell? I saw your courses content and I am amazed man. I am buying all

  • @estherabella1953
    @estherabella1953 4 роки тому +17

    "Internet Explorer can go to the trashcan." OOF

  • @mirabbos02
    @mirabbos02 4 роки тому +3

    Thank you very much for 14:08 this is something which really looking for

  • @abail7010
    @abail7010 4 роки тому +1

    I am pretty new to web dev and only did html and css so some Tipps were too advanced for me until now but actually the lorem20 shortcut is awesome 😄

  • @oliverarensbach7025
    @oliverarensbach7025 3 роки тому

    you saved my life with the first one THANKS!

  • @AtifKhan-cm8qv
    @AtifKhan-cm8qv 4 роки тому +1

    Thank you Dev Ed you teached me a lot. Thank you so much 😀😀😀

  • @samvibes8544
    @samvibes8544 3 роки тому +1

    I love your trick's as I'm new to web development , Also I'm used to many of your trick's .
    Thanks for making this cool videos😊

    • @lukas.webdev
      @lukas.webdev Рік тому

      maybe my new video about the top 10 CSS features in 2023 is interesting for you as well? 😉

  • @chemedev
    @chemedev 5 років тому +3

    Love the last one, tried it one time but didn't realize I needed to change the display to inline, you're a beast!

  • @raggebatman
    @raggebatman 4 роки тому

    If you really wanted to, a fade effect and display together could work in JS. I think I know why you meant it's not possible, since it would execute the statements so fast it's quite unnoticable.
    It is theoretically possible (I haven't done it) to implement with "window.setInterval()" as you can easily specify the delay
    Use an outside variable for iterations, 0-100, if it is greater than or equal to 100 (checked inside the interval) you set the display of whatever element to "none" and clear the interval using "window.clearInterval()"
    Otherwise add 1 to the iteration variable and set the opacity of the element to "(100 - i) / 100" (considering that it can only reach 100 iterations) and you might have a functioning example

  • @RobertWildling
    @RobertWildling 5 років тому

    Wow! I actually really thought I'd know them all, but, hell, was I wrong! The "dark mode" effect is awesome! Thanks so much!
    As for the shadows and VSCode: just hit tab and then 0 directly instead of first deleting all the text hints...

  • @ethantaylor8370
    @ethantaylor8370 4 роки тому

    Man epic vid. Its got a few little tricks I prob should have known but honestly I didn't. Thanks man.

  • @RSTao77432
    @RSTao77432 5 років тому

    On the text gadient you can just use color:transparent; instead of the webkit-fill-color, also using js library prefix free is very handy & will shorten your code.

  • @pierrebertin4364
    @pierrebertin4364 4 роки тому

    There is nothing better than basic things, very nice video !

  • @nathanalpha1960
    @nathanalpha1960 4 роки тому

    To complete your first trick, you can replace pointer-events by visibility: visible (when the button is showed) and visibility: hidden (when the button is... hidden !).
    Then this one will not be clickable at all to when the visibility is hidden. But thanks for the pointer-events trick, I didn't know that ! :D

  • @bilalbeny4172
    @bilalbeny4172 Рік тому

    Thank you so much for all your videos, I have been enjoying watching them. you have a funny and incredible way for learning!!.😍😍😍🥰

  •  3 роки тому

    At 23:36 trick, it would be better use width:fit-content; so the next element inline doesn't put beside the heading. ;) Nice video!!!

  • @alcymn
    @alcymn 4 роки тому

    awesome content Ed! loving the lofi background music as well:D

  • @boristherin4104
    @boristherin4104 3 роки тому

    started like i will find one or two tricks, but was a good one video, learned much more !

  • @danielpmo
    @danielpmo 4 роки тому

    Awesome. I love your videos. Just watched the other video about view time, entertainment vs education. Just thought I would try to give you a sugestion, but first understand my viewing experience. I was about to not watch everything after having had my mind blown by the pointer-events, than I noticed the dark mode and time advanced to see something else. After that I decided to rewind and watch everything. I think what I might have realized that can serve as a suggestion is if I had been briefed on what to expect from those things it could've helped me to decide to watch it all, or maybe on the transitions you could brief, like "This next one is this and I love because of this and it does that. Let me show it to you.". Good luck, keep fun and keep posting.

  • @Sysix
    @Sysix 3 роки тому

    5:10
    you can use tab to get focus on it. When the button is an a-tag that could be problematic.
    Use better visibility:hidden + opacity

  • @Moody0101
    @Moody0101 2 роки тому

    This is just my opinion but instead of adding pointer event property you can do this so you make sure that the element does not interrupt the other elements that might be behind it:
    @keyframe fade {
    0% {
    Opacity : 1;
    }
    99% {
    Opacity : 0;
    }
    100% {
    Display: none;
    }
    }
    So this is going to get rid of the element only after the animation took place.

  • @SHAJ3304
    @SHAJ3304 4 роки тому +1

    You're genuinely a great guy! Thanks so much!

  • @GGGGGGGGGG96
    @GGGGGGGGGG96 4 роки тому

    Hey Ed, I just implemented the dark-mode in an app, it was so easy! And everybody was wondering, what a good developer I am! Thank you very much! :)

  • @Fisheiyy
    @Fisheiyy 4 роки тому

    7:44 split second message says: Shorthand property to set values the thickness of the margin area. If left is omitted, it is the same as right. If bottom is omitted it is the same as top, if right is omitted it is the same as top. Negative values for margin properties are allowed, but there may be implementation-specific limits. honestly idk tf that means

  • @sheeraz1022
    @sheeraz1022 4 роки тому

    This was awesome. Most of the things I didn't knew before. Please keep on sharing similar things.

  • @karolinalencina7121
    @karolinalencina7121 3 роки тому +1

    You’re too good to be real Ed!

  • @anthonyobata5756
    @anthonyobata5756 2 роки тому +1

    Best video I just susribed to your UA-cam channel

  • @lordneojacks
    @lordneojacks 4 роки тому

    The invert and scroll behavior blew my mind

  • @AmericanCube
    @AmericanCube Рік тому +1

    "And let's be honest, IE can go to the trash can" 🤣🤣

  • @TheCreative1798
    @TheCreative1798 5 років тому

    Can you anybody explain me, why teachers have forbidden sections? I.e if I use div, I'll get penalty mark. They say it because of "new html style of writing" but there's so many new tutorials, where div's are used.

  • @hk_build
    @hk_build 4 роки тому

    Hey Dev ed , Are you working as freelancer full time OR work for any pvt company ...what u do basically....? your videos are awesome..!!

  • @MirkoTorrisi92
    @MirkoTorrisi92 4 роки тому

    last tips are absolutely the best ones. MERCI!!!!

  • @filiph.1409
    @filiph.1409 4 роки тому

    Just bought your full javascript and html/css course! Keep up the good work! :D
    And thanks!

  • @diehldrifts
    @diehldrifts 5 років тому +5

    OMG Ed, why are you so good to us? Recent follower and already loving your content so much :) :) :)

  • @MichaelCampbell01
    @MichaelCampbell01 4 роки тому

    I'll be the one(?) guy that says, I didn't know any of these. I'm new to frontend work. So I enjoyed all of it. Thanks!

  • @RahulAhire
    @RahulAhire 5 років тому

    Edwin can you please make a video on compressing html CSS and JavaScript code to make website's performance more better

  • @alicenorman5236
    @alicenorman5236 4 роки тому +1

    Just bought your HTML/CSS course! So excited to start. Thanks for your hard work! 😄

  • @KhaPiano
    @KhaPiano 4 роки тому

    Really enjoyed the trick with font size and rem.

  • @muradishmurodov5272
    @muradishmurodov5272 3 роки тому

    Thanks Ed. Great tutorial video!

  • @Dubstepschule
    @Dubstepschule 3 роки тому

    So entertaining!
    You are my favorite code guy!

  • @mohammadfallah.rasoulnejad5379
    @mohammadfallah.rasoulnejad5379 5 років тому

    dude, i think i should buy your courses right now! very good explanations.

  • @90skid27
    @90skid27 4 роки тому

    I'am a 90's kid and I find the intro offensive, cause I don't even know CSS - Joking.. Great video!

  • @OPGAMER.
    @OPGAMER. 5 років тому +1

    Which theme you have use in this video ?

  • @SamFishback
    @SamFishback 2 роки тому

    Wanted to make a text gradient for a project, thought I would have to import something. Turns out i just had to get youtube algorithm to suggest me your video. Thank you, sensei

  • @berndbauer7145
    @berndbauer7145 5 років тому

    For the button to fade you can simply use visibility:hidden; to deactivate the button.

  • @taylortoast2
    @taylortoast2 5 років тому

    Waited all day to watch your videos. Just to savor it. Looking forward to Saturdays.

  • @lilacandwits5127
    @lilacandwits5127 3 роки тому

    Binge-watching Dev Ed Videos..gives hope for my future :D

  • @miketkachenko5939
    @miketkachenko5939 4 роки тому

    Woah there! That filter thing just blew my head off!

  • @purplesalad7272
    @purplesalad7272 3 роки тому +1

    Helpful tricks

  • @durppp
    @durppp 4 роки тому +1

    The Michael Jackson bit at the beginning was delightful.

  • @shivprasadchatur7469
    @shivprasadchatur7469 4 роки тому

    Can you teach CSS from beginnging.
    New to this channel.
    You seems to be so confident and perfect in CSS

  • @ArianMozafari
    @ArianMozafari 5 років тому

    I always had the first issue, thank you so much Ed! (The video playback is not finished yet)

  • @nikhilvarmadandu1589
    @nikhilvarmadandu1589 4 роки тому +1

    Happy 500k my gorgeous friend ❤❤

  • @CosminSerbanDesign
    @CosminSerbanDesign 5 років тому

    congrats for the 200k - happy to hear you're releasing a course!

  • @fergusfergus4495
    @fergusfergus4495 3 роки тому

    Bro your videos and knowledge are so so amazing, thanks u so much for shared it’s with us

  • @alimansourey2076
    @alimansourey2076 3 роки тому

    I knew a lot of them from 1900 . But the 'cursor event thing' was knew and good one . 😘

  • @UzairAli001
    @UzairAli001 3 роки тому

    5:00 I usually set visibility to hidden which works as well

  • @devKazuto
    @devKazuto 5 років тому

    Unfortunately you've forgot to mention display: inline-block as well as box-sizing: border-box. I prefer to use inline-block on elements that are supposed to be blocks, 'cause this allows me to use margin and padding properly. And I usually hate it when people work with 1rem = 10px, because it confuses me and probably others as well when working on other peoples stylesheet, but at least you've used a percentage and not a fix 10px value.

  •  4 роки тому

    The problem is when you want to 'animate out' something, you also want it to be gone from the dom otherwise it messes up the layout and pointer event does not remove it from the dom so i think its still better to use display none after the animation finished. Or scale it down to 0 after the animation.

  • @rakeshmanathana
    @rakeshmanathana 4 роки тому

    Your studio looks awesome!

  • @Nodsaibot
    @Nodsaibot 2 роки тому +1

    better solution for 1 is visibility:hidden

  • @Russ_Paul
    @Russ_Paul 4 роки тому

    Great tips!!
    Just a thought on the first one, what about 'visibility' as an alternative?
    @keyframes fade {
    from{
    opacity: 1;
    visibility: visible;
    }
    to{
    opacity: 0;
    visibility: hidden;
    }
    }

  • @marcusmedellin1397
    @marcusmedellin1397 4 роки тому

    Great Video and thanks for the new HTML5/CSS3 Course. Looking forward to more videos.

  • @TrivoPlays
    @TrivoPlays 4 роки тому +3

    I love how he is so knowledgeable but at the same time like "the f is this not working?" - daily live of a dev lmao

  • @wykrytotrojana
    @wykrytotrojana 4 роки тому

    Idk why but i enjoy watching your videos :) great job !

  • @bidsouravbest
    @bidsouravbest 2 роки тому

    The last one was awesome, but couldn't we also use width fit-content instead of display inline?

  • @brangja4815
    @brangja4815 3 роки тому

    Thanks, I learn a lot from this.

  • @Amar11115
    @Amar11115 Рік тому

    I will try to apply them in my small projects

  • @5upl1an
    @5upl1an 4 роки тому

    *this will make a fine addition to my collection*

  • @ryukuro8259
    @ryukuro8259 4 роки тому

    Wow this video actually helped me... A Lot

  • @MANMEETSINGH1993
    @MANMEETSINGH1993 3 роки тому

    hey Great Job i really don't know many of the tricks thanks for sharing 🙏🙏👍👍

  • @bonbonpony
    @bonbonpony 4 роки тому

    Well, this should rather be titled "Top 10 CSS Tricks You Didn't Know If You Started Learning CSS Just Now", because it's like the most basic CSS hacks people were using over the last decade or two before Flexbox and Grid came out.
    09:59 How about `display: inline-block` then? ;>
    11:57 Wanna know some really cool trick from the dinosaur era? ;> You can set NEGATIVE margins ;>
    12:20 Good luck with that when your text is more than one line long :J
    16:36 Yeah, and in browsers that doesn't support filters the user will get black text on black background. Sounds like a great idea :q
    18:08 Only if the browser's default font size is set to 16 pixels, which cannot be guaranteed :q

  • @HarshRajAlwaysfree
    @HarshRajAlwaysfree 4 роки тому +1

    I know i am stupid but that , really helped me with my project doing things simply where i was thinking of using .scrollIntoView() , lol how i forgot about something so simple
    well in case you cannot use this trick you can use casual javascript which is more customizable
    element.scrollIntoView({behavior: "smooth", block: "center" }) , will do the job