I recently completed my first challenge (Tribute Page) and ran into an obstacle where I couldn’t find a solution. I have a list centered horizontally using “text-align: center” but I also wanted the list aligned vertically. Can somebody nudge me in the right direction so that I can figure this out please? Any help is appreciated.
I can’t link my codepen because I just created the account but my username there is also CitrineDragon
That’s originally what I tried to use after searching for an answer but it doesn’t change the layout of the list. It’s possible that I made a mistake elsewhere.
when you say “aligned vertically”, you mean in reference to what exactly? Are you trying to position it side-by-each with the photo, and centered vertically on the photo?
lol totally fine, I was teasing more than anything. Just that, on most displays, that will be a very very small type. I forked it and upsized it to 1.8vw so I could read it.
I want the list aligned horizontally in the center and I want the vertical alignment so that the bullet points line up vertically. Does that make sense?
lol ok, so that wasn’t a huge change to make that happen. Basically, you have those in a ul tag, which is a block-level container (like a div for lists!), so we can style that:
#yummy ul {
...
}
That selector gets you any ul element in the div with the id yummy. So what styles do you need? You want the text to be left-aligned, and you want that to have a margin to push it in, both left and right.