Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Maximum text width on a page / page width?

Solved by hughbris View solution

Started by Sebastian Gonzato 4 years ago · 2 replies · 748 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 jeremycherfas, 1 week ago
4 181 2 days ago
General · by lynbor, 6 days ago
2 122 3 days ago
General · by Old Man Umby, 1 week ago
1 100 1 week ago
General · by Sebastian, 1 week ago
1 124 1 week ago
General · by Andy Miller, 3 weeks ago
0 248 3 weeks ago