How to include a CSS background image 🏙️

Sdílet
Vložit
  • čas přidán 9. 09. 2024
  • #CSS #tutorial #course
    CSS background image tutorial example explained
    body{
    background-image: url(background.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    background-size: cover;
    }

Komentáře • 101

  • @BroCodez
    @BroCodez  Před rokem +33

    Bro Code

    Hello
    Lorem ipsum dolor sit, amet consectetur adipisicing elit. Provident, laboriosam. Quasi voluptate, consequuntur quo atque ipsum vitae saepe necessitatibus debitis eius numquam minima quam laudantium, quis tempora molestias tenetur velit.
    /* style.css */
    body{
    background-image: url(background.jpg);
    background-repeat: no-repeat;
    background-position: center;
    background-attachment: fixed;
    background-size: cover;
    }

  • @DanBauer
    @DanBauer Před 10 měsíci +14

    You're honestly such a bro for all your work.

  • @katelynchasie6833
    @katelynchasie6833 Před 9 měsíci +4

    THANK YOU SO MUCH! Other videos make me confused and the output isn't showing up, BUT THIS SAVES MY LIFE

  • @MartaNachname
    @MartaNachname Před 27 dny

    I rarely leave a message. But here we go: THANK YOU! So many others were so fast or skipped steps(probley due to that its automated for them,which I get) but this time I understood it! OMGoodness, I did a lil old lady happy dance

  • @amstorm8954
    @amstorm8954 Před dnem

    Amazing i feel now like a web developer:D

  • @Beanblws
    @Beanblws Před 5 měsíci +1

    THANK YOU SO MUCH THIS IS WORKKKKK! May you be blessed throughout your life

  • @juniordre652
    @juniordre652 Před měsícem

    you are a life safer, cannot believe this can solve a problem i having been trying to find a solution for the past 2 days

  • @AdanJelle-wt4zu
    @AdanJelle-wt4zu Před 2 měsíci

    my teacher of all the time God bless you

  • @user-nu5xy6hn2i
    @user-nu5xy6hn2i Před 9 hodinami

    You are a Sigma, wow bro!

  • @kevinsantiago2159
    @kevinsantiago2159 Před 4 měsíci +1

    You are a lifesaver, love you man

  • @ThandoHlongwane-zd4cb
    @ThandoHlongwane-zd4cb Před 10 měsíci +4

    ❤🎉 Thanks bro you made me a better bro.

  • @YasaruDeneth
    @YasaruDeneth Před 2 měsíci

    thank you so much i am trying to fit the image to background thanks for this video now i am not forgetting this

  • @sadikusallieufofana3027
    @sadikusallieufofana3027 Před měsícem

    Awesome

  • @white3830
    @white3830 Před měsícem

    Thanks bro saved my life❤

  • @iescu
    @iescu Před 3 měsíci

    Thank you, been looking for this for 30 mins and found nothing helpful, finnaly found ur vid and solved the problem. Thanks!

  • @zahid1909
    @zahid1909 Před 8 měsíci

    You are a real Master, bro! Respect!!

  • @JorielTejada-te4dd
    @JorielTejada-te4dd Před 11 měsíci

    BROOO IMY SO MUCH I"M GLAD THAT YOU ARE BACK

  • @K14Xeditz
    @K14Xeditz Před rokem +2

    Thx i understood everything❤

  • @RK93838
    @RK93838 Před 2 měsíci

    Thanks my problem is solved

  • @spidysense7754
    @spidysense7754 Před měsícem

    Brooooooooooooooooooo ✨

  • @deeled7245
    @deeled7245 Před 3 měsíci

    Thank you very much, that was a great help.

  • @CaptainJames-d2o
    @CaptainJames-d2o Před 11 dny

    Thanks❤

  • @Kiratech234
    @Kiratech234 Před 7 měsíci

    Bruh ur videos are always awesome thanks

  • @vedun7375
    @vedun7375 Před 2 měsíci

    Thank You so Much . It helped alot !!!

  • @thenoobboi3236
    @thenoobboi3236 Před 9 měsíci

    bro you helped me twice good job

  • @kaitlynsmiless3094
    @kaitlynsmiless3094 Před 10 měsíci +2

    I just watched another video on this, and the person did this same code but it was within HTML file in and it had the same outcome. Is there a difference in doing this? I feel the HTML and CSS being separated keeps it much more organized and a clean look unless there's a vast difference in doing it in the HTML file.

    • @TheAngelMichael
      @TheAngelMichael Před 10 měsíci

      What you are talking about is "inline css" and it has the highest priority meaning that if you were to style the same elements with different values in an external stylesheet, the inline style values would show. It goes in this order from highest to lowest priority. Inline css, internal css, external css. Inline means you style them directly, internal means you use elements and external means a seperate stylesheet you import into html. I agree, it's best to use an external stylesheet but it has it's applications.

  • @simobono-n5
    @simobono-n5 Před 2 měsíci

    thank you very much you are the best

  • @lebronaraday8574
    @lebronaraday8574 Před 12 dny

    thank you

  • @TheVSI
    @TheVSI Před 5 měsíci

    Thank you so much, imthis was extremely helpful

  • @xsupreme144
    @xsupreme144 Před 5 měsíci

    🔥🔥🔥🔥🔥🔥🔥

  • @user-ql7pw7ld1n
    @user-ql7pw7ld1n Před 6 měsíci

    Totally loved it

  • @yasotube
    @yasotube Před rokem

    Very cool 🎉

  • @chitchatgamer4908
    @chitchatgamer4908 Před 8 měsíci +1

    Thanks

  • @sharifhussain9267
    @sharifhussain9267 Před 7 měsíci

    Thank you..... that was very helpful ❤

  • @Pororo1726
    @Pororo1726 Před 6 měsíci

    Good work bro code

  • @martindervisov2211
    @martindervisov2211 Před 8 měsíci +20

    It doesn't work at my place😕🙁☹

  • @hexog101
    @hexog101 Před 2 měsíci

    Thanks bro. It worked.

  • @MikuNEW
    @MikuNEW Před 6 měsíci +1

    Thanks Bro!

  • @AisaKawaii_247
    @AisaKawaii_247 Před 4 měsíci

    thanks bro 👍👍👍

  • @officialvishalpatil5456
    @officialvishalpatil5456 Před 4 měsíci

    thank bro it's working thank 🤩

  • @damianbix7
    @damianbix7 Před 4 měsíci

    Thank you bro👍👍

  • @coderopy
    @coderopy Před 11 měsíci

    Very nice man

  • @bookiethelion
    @bookiethelion Před 4 měsíci

    bro, i love you!

  • @Danfel369
    @Danfel369 Před 3 měsíci

    Thank you very much broo!!

  • @abidshaikh8251
    @abidshaikh8251 Před 9 dny

    //thanks

  • @iarawy.
    @iarawy. Před 6 měsíci

    a life saver

  • @vidyoustrm1442
    @vidyoustrm1442 Před 3 měsíci

    Thank you!

  • @maxklariczen7320
    @maxklariczen7320 Před 8 měsíci

    youre the boss!!!!

  • @Hanzz2008b
    @Hanzz2008b Před 3 měsíci

    Tysm bro🎉🎉🎉

  • @baghelcreation9146
    @baghelcreation9146 Před 4 měsíci

  • @Bootcamp-Coupondeal
    @Bootcamp-Coupondeal Před 2 měsíci

    thank u so much

  • @SinaLaniakea
    @SinaLaniakea Před 6 měsíci

    Thank you 🙏

  • @sakilanitahar3204
    @sakilanitahar3204 Před měsícem

    But why the svg doesn't work when i put it as a background img

  • @mariamkorkotadze4540
    @mariamkorkotadze4540 Před 5 měsíci

    Thank you❤❤

  • @Sabrina-gq5qx
    @Sabrina-gq5qx Před 5 měsíci

    thanksssss

  • @rjmurphyo0
    @rjmurphyo0 Před 3 měsíci

    this works but how come my microsoft expressions program is saying this isn't the current schema?

  • @reezo4290
    @reezo4290 Před 3 měsíci

    “It works on my machine”

  • @tonyam3676
    @tonyam3676 Před 6 měsíci

    How did the html and style sheet become automatically linked to each other?

  • @Emperor-Kane
    @Emperor-Kane Před 3 měsíci

    How do you add a background image to a 2nd page?

  • @Kate-fz5vs
    @Kate-fz5vs Před 7 měsíci

    TYSM

  • @philsmycrevice
    @philsmycrevice Před 2 měsíci

    body {
    width: 100%;
    height: 100vh;
    margin: 0px;
    padding:0px;
    background-image: url(2turdsplaying[169].jpg);
    background-repeat: no-repeat;
    background-size: cover;
    background-position: center;

    }
    I have the img file in my folder so does anyone know why my background pic isn't displaying?

  • @andyl9920
    @andyl9920 Před 3 měsíci

    Where can i find great high pixel images for free?

  • @ravalik2103
    @ravalik2103 Před 11 měsíci

    Plz do full stack web development course

  • @homeofqualitymovies8185
    @homeofqualitymovies8185 Před 5 měsíci

    What is the size of the image

  • @labassproject2897
    @labassproject2897 Před 6 měsíci

    more than 2 days searching and i still cannot see a backgroung , even when y click the url link in css i can see the image im gonna blow my computer

  • @GoopsSoup
    @GoopsSoup Před 27 dny

    why it doestn work for me

  • @vijayaBGvijayaBG
    @vijayaBGvijayaBG Před 5 měsíci

    bro this code is not working in blogger website bro

  • @panagantinagaraju870
    @panagantinagaraju870 Před 3 měsíci

    Sir still it is not working for me sir

  • @Paradisecountryinc
    @Paradisecountryinc Před 9 měsíci

    What program are you using in this video?

  • @soueinivle948
    @soueinivle948 Před 9 měsíci

    why when I use backround image it will gonna be blury

    • @techymc3033
      @techymc3033 Před 9 měsíci

      Maybe you could add a vector image instead

  • @LegoismYT
    @LegoismYT Před 7 měsíci

    he is a bro

  • @9-volt247
    @9-volt247 Před 9 měsíci

    Wait, this code works in Khan Academy? I didn't know that!

  • @raging_azzhole3672
    @raging_azzhole3672 Před 9 měsíci +2

    this code doesn't work for me at all, doesn't do anything and visual studio says they are wrong??

    • @hubjinthegreat
      @hubjinthegreat Před 9 měsíci +1

      if your background image is in its own folder then your code should look like: background-image: url(images/background.jpg); Where I typed images is the name of the folder where the image will be, however your folder might have a different name.

    • @UNKNOWN_1005-o5A
      @UNKNOWN_1005-o5A Před 7 měsíci

      it still does not work😮‍💨😮‍💨@@hubjinthegreat

    • @hamzitoless
      @hamzitoless Před 7 měsíci

      @@hubjinthegreat hey , I have written that way but the image still does not appear on the live server.

    • @rockrohith2217
      @rockrohith2217 Před měsícem +1

      Thank you😊​@@hubjinthegreat

  • @bogdanlazy1997
    @bogdanlazy1997 Před 6 měsíci

    chur bro