CSS Tricks: Horizontal Lines Before and After Texts (Quick Tutorial)

Поділитися
Вставка
  • Опубліковано 2 жов 2024
  • This Video is going to show you CSS Tricks: Horizontal Lines Before and After Texts (Quick Tutorial) Horizontal Line After Text CSS
    What about double lines on the sides and line bar on the bottom? Watch this video and learn more techniques: • CSS Heading Text with ...
    Get the code:
    22bulbjungle.co...
    Subscribe to Garnatti one: bit.ly/2FiBlPO
    Visit our website: 22bulbjungle.com
    Like us on Facebook: / 22bulbjunglerocks
    Follow us:
    Instagram: / 22bulbjunglerocks
    Twitter: / 22bulbjungle

КОМЕНТАРІ • 45

  • @garnattione
    @garnattione  9 місяців тому

    Show some love :) ✌
    22bulbjungle.com/supportme

  • @akazad3678
    @akazad3678 3 роки тому +2

    you are really genius

  • @꽁꽁-d4v
    @꽁꽁-d4v 4 роки тому +2

    THX!!!!! Teacher I did it !!!!
    I have some question !!!
    If i want to make double line, what tags should i add more??

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

      This is what you're looking for: ua-cam.com/video/nAqW6-JJGmw/v-deo.html

  • @zwehtet-z1d
    @zwehtet-z1d Рік тому

    when i change div background color this horizonal line was not found

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

      You can try stacking it above other elements using the z-index property. 🙂

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

    thank you sir this video helped me alot and saved my time

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

    Thank you sir ☺️

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

    span is very important here to see z-index working

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

      Thank you so much for clarifying this, your comment saved me a bunch of trouble!

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

    Although you can use a single colon for psuedo elements, it's recommended to use double colon to distinguish it from psuedo classes.

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

    WHATS THE NAME OF THE SONG PLS :)

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

      I don't remember but it's all from UA-cam 🙂

  • @MuhammadUsman-ri1hm
    @MuhammadUsman-ri1hm 3 роки тому

    I did exactly the same thing but the line moves way up the page don't know why. Can you please explain why is this happening?

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

      Make the parent relative positioned. See the video.

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

    i want horizontal lines to disappear on hover . how to do this?

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

    What to do if we want to insert image

  • @jaydee-222
    @jaydee-222 3 роки тому

    Why not just use the ::before and set the width to 100%?

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

    I wonder if you could tell me why my code isn't working,
    Html:

    Welcome

    Css:
    *{
    padding: 0%;
    margin: 0%;

    }
    h1{
    position: relative;
    text-align: center;
    padding: 200px;
    font-family: Verdana, Geneva, Tahoma, sans-serif;
    }
    h1::before{
    content: none;
    width: 200px;
    background-color:black ;
    position: absolute;
    left: 0px;
    top: 50%;
    height: 20px;
    display: block;
    } h1::after{
    content: none;
    width: 200px;
    background-color:black ;
    position: absolute;
    right: 0px;
    top: 50%;
    height: 20px;
    display: block;
    }

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

      content:''; and give a width:600px to h1 your code will work Hope it will help thank you

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

    how to close the distance between them

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

      put it in a div and define the width there

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

    hello i dont know the reason why when i use z-index: -2, the line disappear from it

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

      It's used to order the layer of elements.
      The higher the value than any other elements the more priority for it to be on the top of any other elements.

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

    really helpful tutorial

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

    What ends every line of CSS?

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

    Awesome, sir.

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

    Thank you

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

    Thanks

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

    ty fyi

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

    do u have any vids on how to make this responsive?

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

      Try this ua-cam.com/video/mjDek0d1kak/v-deo.html

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

    perfect solution! Thanks!

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

    What about double lines on the sides and line bar on the bottom? Click on the following link to watch the video: ua-cam.com/video/nAqW6-JJGmw/v-deo.html

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

      how to make line long same from div.class=col-md ?

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

    what if the backgound is an image and not white color?

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

      Then you have to add both before and after for the left and right side lines. See more: ua-cam.com/video/nAqW6-JJGmw/v-deo.html

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

    Sir what is main use of Z-index???

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

      Use to order the layer of elements.

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

    how can I do this in a word document?

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

    Gracias tu video me ayudo mucho :D

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

    what app is this?