CSS Tutorial For Beginners 18 - Attribute Selectors

แชร์
ฝัง
  • เผยแพร่เมื่อ 19 ต.ค. 2024

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

  • @maheshnayak9829
    @maheshnayak9829 7 ปีที่แล้ว +13

    Explained concepts in simple, clear, precise, to the point. My simple suggestion/request, every time you open browser from bracket, it is taking unnecessary time, so u can use Alt+Tab to switch between bracket and chrome + refresh Or at least set html file properties to google chrome so that you can directly open html file in chrome by double clicking html file. I hope you take my suggestion positively. And thanks for knowledge sharing.

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

    i just managed to use this on a single image link in a gallery. the guy asked me if i could disable the link on this one specific image. i thought, "well no i can't because you're using the wp gallery block and i don't have access to any single click function, instead if the gallery were coded, it would be simple." then i remembered this tutorial and, mr. net ninja....you are just amazing man. your tutorials/playlists are just the best! thanks so much for educating us!

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

    Hey Shaun, maybe too late for this series, but I am using the Visual Studio Code application that you recommended in your 'Modern Javascript: from novice to ninja' udemy course with live server and it works so much smoother than doing all that 'save and then open with google chrome/firefox/whatever' steps that you are doing. Great course otherwise! Thank you!

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

    Hi Shaun, great job with your tutorials, super helpful!
    Just wondering what instances would necessitate an element having more than one value to an attribute
    Example
    Seeing as selecting it with both class differently would create a conflict
    Super grateful for your tutorials once again!

  • @rene78
    @rene78 6 ปีที่แล้ว +13

    "title" attribute for "a" tag? Never heard of that.
    Edit: Learned it now. It is the text, which is shown when hovering over the link with the mouse.

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

      I´m so happy this chanel is full of a lot´s of information. Things you never thought about before.

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

      just wanna thank you 'cause u didn't just keep the info for urself as u shared it with us, actually I searched for an answer and didn't find one but thanks to u I know now.

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

    I love the way you teach the basic now I know that I watch your video all before take make advance

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

    this has literally exploded my mind. Im about to go full regex in my css

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

    Thank so much! Great explanation as usual!
    When you were talking about the caret sign, I thought that you had said the "carrot sign", ahhah! I was wondering if there was truly some mysterious sign named like that XD

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

      Haha, really glad you liked :)

  • @somedude2577
    @somedude2577 8 ปีที่แล้ว +1

    I just love how you say "style"

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

    hahah. Yo that "what the hell is going on" cracked me man. hhahaha. good one

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

    Thank you bro, it's so satisfying when the code works.. 🙏😃

  • @savikrish1
    @savikrish1 5 ปีที่แล้ว +1

    In one of your previous tutorials, you said that elements are worth 1 point, classes are 10, and an id is 100. This is how the browser would weight them. So how much points are attribute selectors worth?

  • @eeker01
    @eeker01 7 ปีที่แล้ว +1

    Can we chain attribute selectors together? Say we have 5 element like a tag, each with multiple attributes, but we only want to target one of them, decided by a combination of 2 attributes - say the href and the type attributes.

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

    As always its awesome !, but a small suggestion if u use dark theme background visibility will be more good .

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

      Hey, thanks. I use a dark theme in all my latest videos and playlists :)

  • @fritz-creates
    @fritz-creates 5 ปีที่แล้ว

    Hej Net Ninja, thank you so much for this great tutorials! You explain it very well! HOWEVER, how do you keep track of all the different ways to select items? You got a suggestion how to learn them systematically? Watching your videos over and over? haha
    Have a good one,
    Fritz

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

    Thank you so much for this

  • @thepowerofenergy
    @thepowerofenergy 6 ปีที่แล้ว

    "sensity"? hahaha I love your videos :D

  • @sagarsehwag9816
    @sagarsehwag9816 7 ปีที่แล้ว

    Out of all the selector which will have greater precedence attribute selector or id or class?

  • @noahpfluke6981
    @noahpfluke6981 5 ปีที่แล้ว +1

    Did anyone else catch how his "backgound: grey" typo(missing an r) at 3:12 somehow fixed itself? But when he went back to his code at 3:30 it was suddenly fixed?! I didn't see a spot where he cut and edited the video, I'm starting to believe in ghosts..

  • @salehabuhussein5229
    @salehabuhussein5229 5 ปีที่แล้ว

    Attribute Selector is stronger than id and class >??? Is that correct?

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

    Hi. What´s the difference in writing .deck or span[class] what´s the difference in using the normal class dot?

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

    so funny hhaha I love this s2

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

    amazing

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

    ty brother

  • @doingsneakypeakylike
    @doingsneakypeakylike 7 ปีที่แล้ว

    this is so cool

  • @mythilymegha2823
    @mythilymegha2823 5 ปีที่แล้ว

    a[href^="http"]{
    color="pink";
    }
    span[class-="deck"]{
    color:rgb(48, 226, 25);
    }
    isnt working for me .
    Can you give the source code

  • @ye313
    @ye313 5 ปีที่แล้ว

    Kindly do photoshop tutorials

  • @nickwoodward819
    @nickwoodward819 6 ปีที่แล้ว

    Hi net ninja! just wondering - I've styled the body to have zero padding, but list items (and the ul) don't seem to respect it, even though they're descendants. I have to individually style them. Is this the correct behaviour?

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

      +nick woodward hey, yeah that's correct. The default browser styles for ul's includes padding. So even though you've said in the body you'd like to have 0 padding - and that will apply to descendants too - the default browser style for a ul (which is more specific) overrides this.

    • @nickwoodward819
      @nickwoodward819 6 ปีที่แล้ว

      good to know - thanks for the quick reply!
      great videos by the way, enjoying them a lot. the rest of css... hmm, maybe not so much! i come from a java background, and it's the lack of feedback I hate! like lining up this logo and an inline ul. i've got it working on one page, but on the other i can't see why it won't. they're all inline-blocks, but the nav refuses to sit on the same line as the logo (even with all the margins and padding zero'd)

    • @nickwoodward819
      @nickwoodward819 6 ปีที่แล้ว

      i know i could float the image and then clear it, but i'm annoyed it won't do as it's told XD

    • @nickwoodward819
      @nickwoodward819 6 ปีที่แล้ว

      i fixed it... but wat?? i had to virtically align the header img even though it filled all the space in the header, before the nav would vertically align. i feel that my desk is going to have a head shaped hole in it by the time i'm done with css!

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

    Does my laptop screen sucks or is it because he is using white background color ??

  • @trendingnow5693
    @trendingnow5693 5 ปีที่แล้ว

    What to do to colour different div in different colours..or different a in different colours

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

    what's in the front of the href tag?

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

    cons:
    >white theme
    >reopens website instead of hitting F5
    pros:
    >his explanations are superb

  • @andreianghel4961
    @andreianghel4961 8 ปีที่แล้ว +4

    Me again :D - how about when we looking for a text contained ... eg : xxxxlettersxxx.pdf ?

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

      +Andrei Anghel Hey again :). You can target an element with a specific string of characters in an attribute by using the *= combination. E.g. a[href*="letters"] will pick up an anchor tag whose href includes the word 'letters' in it at any point. More info on the Mozilla guide for attribute selectors - developer.mozilla.org/en/docs/Web/CSS/Attribute_selectors

    • @NetNinja
      @NetNinja  8 ปีที่แล้ว +10

      +The Net Ninja for some reason YT doesn't like the asterisk sign. It should be a[href asterisk="letters"], where asterisk is the little start symbol! Hope that makes sense.

    • @andreianghel4961
      @andreianghel4961 8 ปีที่แล้ว

      Makes perfect sense mate ! Thank you sir !

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

    Hesh tee emm ell

  • @ye313
    @ye313 5 ปีที่แล้ว

    Do more in depth courses on udemy

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

    Is anyone know what is the name of the code editor he used in the video?

  • @kumarkanishka5562
    @kumarkanishka5562 5 ปีที่แล้ว

    8:56
    pls someone explain
    how it is green when there should be the default browaser colouration of blue as we studied in earlier lectures

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

      Because it's not the default values anymore. Using a[href$="pdf"]{
      color: green;
      }
      means now that every link with an ending "pdf" link will get styled, and in that example he used the green color.

  • @JohnyVman
    @JohnyVman 5 ปีที่แล้ว

    Why use this complex method when there can be used simple class and id. I don't get it.

  • @allwynsamuvel432
    @allwynsamuvel432 6 ปีที่แล้ว

    ?

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

    #simple example of Attribute selector
    #html
    Name:
    Url:
    #css
    input[type="text"] {
    text-transform: uppercase;
    }
    input[type="url"] {
    background: red;
    }

  • @iclonethefirst
    @iclonethefirst 7 ปีที่แล้ว

    Interesting, but I think it isn't used so often

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

    Don't succumb to his subliminal messages! He calls us all "butt holes" at 5:24!!!

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

      Hahahahaha! :p

  • @SanthoshKumar-kx9fe
    @SanthoshKumar-kx9fe 2 ปีที่แล้ว

    How anchor tag is convert to purple

  • @yasser2768
    @yasser2768 6 ปีที่แล้ว +1

    lmao
    What the hell is going on lol what an intro

  • @AAAAAA-gj2di
    @AAAAAA-gj2di 3 ปีที่แล้ว

    3:15 "backgound"

  • @rushikeshparab132
    @rushikeshparab132 7 ปีที่แล้ว

    is class*="deck" and class~="deck" same?

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

      *= is for contains but this to last a little more milliseconds

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

    damn man nothing is visible

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

    What the hell is going on guys 😂🤣

  • @noahpfluke6981
    @noahpfluke6981 5 ปีที่แล้ว

    Did anyone else catch how his "backgound: grey" typo(missing an r) at 3:12 somehow fixed itself? But when he went back to his code at 3:30 it was suddenly fixed?! I didn't see a spot where he cut and edited the video, I'm starting to believe in ghosts..