I have a doud about desing / define classes

how i decide write selectors on mi CSS code?

i have this HTML.

Object test to undesteand items

X Heder

  1. Home
  2. About
  3. Contac

and i want to center the elements into DIV´s.
But how i decide to point object by class, descendants or chaining

In my CSS have:

/stype for intem and flex items/
section {
border: 5px solid black;
}

div {
border: 5px solid red;
}

.flex-container {
display: flex;
padding: 1px;
text-align: center;

}

.flex-container div {
flex-grow: 1;
margin: 10px;
}

.flex-container li {
list-style-position: inside;
border: 1px solid blue;
}

somebody can give me a little guide or oriantation?

1 Like

Hi, there!

Could you edit your post to properly format your HTML and CSS?

You’ll want to use preformatted text:
image

Or you can copy and paste:

```
type or paste code here
```

2 Likes

tnks.

i can´t edit the post x.x