Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Maximum text width on a page / page width?

Solved by hughbris View solution

Started by Sebastian Gonzato 4 years ago · 2 replies · 1004 views
4 years ago

What's the best / easiest way of limiting the amount of text on a page / the page width?

Concretely, the text on my blog spans the full width of my screen, which on a 17 inch laptop is quite unappealing. Not sure if this is the page width or text width?

4 years ago Solution

Hi. That's not really a Grav question but a CSS question.

If you are using Grav, there may be a simple answer depending on the theme you are using. Please say which one.

With the small amount of context you provide, I can suggest looking at which HTML element contains your content you want to limit. The CSS property called max-width could be set to either a percentage or a fixed value on devices with screen width greater than X.

There's a whole lot more to this and several other ways to achieve the same thing, but it's too much to explain everything here and I don't even know what you already know.

👍 1
4 years ago

Apologies for the late answer and thank you, indeed I just needed to be reminded that CSS exists 😃

👍 1

Suggested topics

Topic Participants Replies Views Activity
General · by themetman, 24 hours ago
2 40 17 hours ago
General · by Hanns Mattes, 1 week ago
0 121 1 week ago
General · by Karmalakas, 1 week ago
2 185 1 week ago
General · by Hanns Mattes, 3 weeks ago
0 235 3 weeks ago
General · by Dima, 4 weeks ago
1 211 4 weeks ago