How to include a CSS background image 🏙️

Поделиться
HTML-код
  • Опубликовано: 20 сен 2023
  • #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;
    }

Комментарии • 74

  • @BroCodez
    @BroCodez  Год назад +19

    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 6 месяцев назад +8

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

  • @katelynchasie6833
    @katelynchasie6833 6 месяцев назад +3

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

  • @beanblws1112
    @beanblws1112 Месяц назад +1

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

  • @zahid1909
    @zahid1909 5 месяцев назад

    You are a real Master, bro! Respect!!

  • @kevinsantiago2159
    @kevinsantiago2159 Месяц назад +1

    You are a lifesaver, love you man

  • @JorielTejada-te4dd
    @JorielTejada-te4dd 7 месяцев назад

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

  • @ThandoHlongwane-zd4cb
    @ThandoHlongwane-zd4cb 7 месяцев назад +4

    ❤🎉 Thanks bro you made me a better bro.

  • @user-ql7pw7ld1n
    @user-ql7pw7ld1n 3 месяца назад

    Totally loved it

  • @yasotube
    @yasotube Год назад

    Very cool 🎉

  • @K14Xeditz
    @K14Xeditz Год назад +2

    Thx i understood everything❤

  • @coderopy
    @coderopy 8 месяцев назад

    Very nice man

  • @thenoobboi3236
    @thenoobboi3236 6 месяцев назад

    bro you helped me twice good job

  • @deeled7245
    @deeled7245 4 дня назад

    Thank you very much, that was a great help.

  • @winneremele7239
    @winneremele7239 4 месяца назад

    Bruh ur videos are always awesome thanks

  • @sharifhussain9267
    @sharifhussain9267 4 месяца назад

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

  • @TheVSI
    @TheVSI 2 месяца назад

    Thank you so much, imthis was extremely helpful

  • @bookiethelion
    @bookiethelion 29 дней назад

    bro, i love you!

  • @AisaKawaii_247
    @AisaKawaii_247 Месяц назад

    thanks bro 👍👍👍

  • @71Lucid
    @71Lucid 2 месяца назад +1

    Thank you so much man 😄😁

  • @iescu
    @iescu 16 дней назад

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

  • @raihanfahrezi2521
    @raihanfahrezi2521 20 дней назад

    Tysm bro🎉🎉🎉

  • @damianbix7
    @damianbix7 27 дней назад

    Thank you bro👍👍

  • @Pororo1726
    @Pororo1726 3 месяца назад

    Good work bro code

  • @officialvishalpatil5456
    @officialvishalpatil5456 Месяц назад

    thank bro it's working thank 🤩

  • @tonyam3676
    @tonyam3676 3 месяца назад

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

  • @SinaLaniakea
    @SinaLaniakea 3 месяца назад

    Thank you 🙏

  • @foodieintelligence7250
    @foodieintelligence7250 Месяц назад

    Thanks bro

  • @MikuNEW
    @MikuNEW 3 месяца назад +1

    Thanks Bro!

  • @chitchatgamer4908
    @chitchatgamer4908 5 месяцев назад +1

    Thanks

  • @rjmurphyo0
    @rjmurphyo0 9 дней назад

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

  • @maxklariczen7320
    @maxklariczen7320 5 месяцев назад

    youre the boss!!!!

  • @iarawy.
    @iarawy. 2 месяца назад

    a life saver

  • @ravalik2103
    @ravalik2103 8 месяцев назад

    Plz do full stack web development course

  • @Sabrina-gq5qx
    @Sabrina-gq5qx Месяц назад

    thanksssss

  • @mariamkorkotadze4540
    @mariamkorkotadze4540 2 месяца назад

    Thank you❤❤

  • @kaitlynsmiless3094
    @kaitlynsmiless3094 7 месяцев назад +1

    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.

    • @MichaelTheAngels
      @MichaelTheAngels 7 месяцев назад +1

      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.

    • @opprogram8620
      @opprogram8620 2 месяца назад

      Yeah it’s exactly what the guy above said. You probably want to modularize your code (separate files) depending on the size of your project.

  • @Kate-fz5vs
    @Kate-fz5vs 4 месяца назад

    TYSM

  • @Emperor-Kane
    @Emperor-Kane 13 дней назад

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

  • @labassproject2897
    @labassproject2897 3 месяца назад

    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

  • @homeofqualitymovies8185
    @homeofqualitymovies8185 2 месяца назад

    What is the size of the image

  • @baghelcreation9146
    @baghelcreation9146 29 дней назад

  • @xsupreme144
    @xsupreme144 Месяц назад

    🔥🔥🔥🔥🔥🔥🔥

  • @andyl9920
    @andyl9920 11 дней назад

    Where can i find great high pixel images for free?

  • @Paradisecountryinc
    @Paradisecountryinc 6 месяцев назад

    What program are you using in this video?

  • @vijayaBGvijayaBG
    @vijayaBGvijayaBG 2 месяца назад

    bro this code is not working in blogger website bro

  • @soueinivle948
    @soueinivle948 6 месяцев назад

    why when I use backround image it will gonna be blury

    • @techymc3033
      @techymc3033 6 месяцев назад

      Maybe you could add a vector image instead

  • @panagantinagaraju870
    @panagantinagaraju870 18 дней назад

    Sir still it is not working for me sir

  • @LegoismYT
    @LegoismYT 3 месяца назад

    he is a bro

  • @9-volt247
    @9-volt247 6 месяцев назад

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

  • @martindervisov2211
    @martindervisov2211 5 месяцев назад +13

    It doesn't work at my place😕🙁☹

  • @raging_azzhole3672
    @raging_azzhole3672 6 месяцев назад +2

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

    • @hubjinthegreat
      @hubjinthegreat 5 месяцев назад

      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.

    • @user-gx6zp4tv7f
      @user-gx6zp4tv7f 4 месяца назад

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

    • @hamzitoless
      @hamzitoless 3 месяца назад

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

  • @bogdanlazy1997
    @bogdanlazy1997 2 месяца назад

    chur bro