From the course: The Freelance Stack: Real Project with Next.js and Strapi
Unlock this course with a free trial
Join today to access over 25,200 courses taught by industry experts.
Styling: Article paragraph - Next.js Tutorial
From the course: The Freelance Stack: Real Project with Next.js and Strapi
Styling: Article paragraph
So, to do the styling of the article paragraph, we're just going to go into our article components styling file, and we'll just add the article paragraph right here. What we're going to say is the margin bottom of this should be 6 rem, and inside we need to now adjust the styling of our unordered lists, which are these ones right here. We want to have those dots start where the paragraph also starts horizontally. So we're going to first say, by the way as well, if you notice here, we also want to add some margin at the top. So we're first going to say for that whole element, we're going to say the margin top is 2rem. And then every list item within that should have a margin left of 2rem as well. And so this way, we now have it perfectly aligned, exactly like it is in the design. We can also add that when we have the paragraph with image, so you see that here. And that is actually everything we need to do in styling here. It was just a question of a few margins.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
-
-
-
-
-
-
(Locked)
Create dynamic zone in Strapi for customizable blog content14m 6s
-
(Locked)
Creating data for highlight article8m 28s
-
(Locked)
Article hero section JSX5m 45s
-
(Locked)
Styling: Article hero section5m 26s
-
(Locked)
Article intro component JSX8m 40s
-
(Locked)
Styling: Article intro component5m 29s
-
(Locked)
Generic article component to render different component depending on Strapi data9m 14s
-
(Locked)
Article headline JSX3m 15s
-
(Locked)
Styling: Article headline1m
-
(Locked)
Text with image component JSX15m 9s
-
(Locked)
Styling: Text with image component5m 48s
-
(Locked)
Article paragraph JSX2m 23s
-
(Locked)
Styling: Article paragraph1m 6s
-
(Locked)
Image component JSX3m 49s
-
(Locked)
Styling: Image component2m 20s
-
(Locked)
Other articles section on individual blog page3m 17s
-
(Locked)
Blog section homepage JSX13m 11s
-
(Locked)
Styling: Blog section homepage8m 52s
-
(Locked)
Fix article item for featured items on homepage1m 18s
-
(Locked)
-
-