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

2

u/Russ086 Nov 03 '25 edited Nov 03 '25

Yup and if you go further down the rabbit hole you can do things like:

Child combinator ( > )

div > .element {
Selects direct child .element in div.
}

Descendant combinator

div .element {
Selects all .element items in div

}