How to Work With PAGE CONTAINERS in HTML & CSS: Step-By-Step Guide

Поделиться
HTML-код
  • Опубликовано: 4 ноя 2024

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

  • @Brainspoil
    @Brainspoil 8 месяцев назад +2

    Nice and easy to follow, good explanation of why and how it works. Looking forward to more tutorials.

  • @MalaikaAmir-i3l
    @MalaikaAmir-i3l Месяц назад +1

    thanx alot this video is proven to be very helpful for specially begineers

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

    I watched many tutorial but this is awesome

  • @PetionC
    @PetionC 8 месяцев назад +2

    thanks

  • @chrisicotec7652
    @chrisicotec7652 8 месяцев назад +1

    its redundant to add height to your container, its height is set by the content, likewise its redundant to use it in your top bar, you should just add padding to its content as it will always be 100% of its content, unless specified

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

      Hi Chris, as I explain in the video, I set the height to 100% because I tend to use flexbox a lot, and to have a vertical alignment on parent elements with fixed height, like a topbar or hero section, you need your container to grow with the parent element. Regarding your second point, using paddings would not be the correct approach because I would have to set the same paddings to all other sections of the page in order to have the left and right alignment, this would cause unnecessary code repetition. The container is set only once for all screen dimensions and I can use it many times throughout the page.

    • @chrisicotec7652
      @chrisicotec7652 8 месяцев назад +1

      @@dawebschools even with flexbox declaring a height to any layout element is redundant...you would only be applying padding to the top and bottom, reduce your code with multiple variables, eg padding:1rem auto; or if you are only gonna use left and right padding theres different ways ways to do it, padding: 0 auto; or padding-inline:auto, as long as you are within your container then you write less code

  • @scott-richardson
    @scott-richardson 3 месяца назад +1

    You can do this without nesting container divs inside other divs. Simply apply a 4% padding to the outer div and don't bother with the inner div.

  • @alexfrozen
    @alexfrozen 7 месяцев назад +2

    Media queries in 2024?

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

      Hi Alex, what would you suggest?

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

      Try search "css no media queries" for good start. It will help.

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

    please i need download link or the jpeg of the apple wrist watch

  • @jasurhaydarovcode
    @jasurhaydarovcode 3 месяца назад +2

    thanks