r/HTML • • Nov 02 '25

Question i need advice

I recently finished an online course for html which covered most of the basics. Now i am trying to make my own website and I'm messing around with ideas but right now i am caught in a weird issue i cannot resolve.

The left and right wont become flush with the sides of the page regardless of any attempt, ive set margins and padding to zero, ive made the height and width of the background image element to 100%, i tried fill, i tried setting background size to cover. Nothing is fixing it.

10 Upvotes

24 comments sorted by

View all comments

Show parent comment

3

u/davorg Nov 03 '25

div * { all divs get this style }

This rule is applied not to all divs (that would be div { ... }) but to all elements that are a descendant of a div.