Skip to content
Grav 2.0 is officially stable. Read the announcement →
General

Maximum text width on a page / page width?

Solved by Hugh Barnes View solution

Started by Sebastian Gonzato 4 years ago · 2 replies · 699 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 jean-louis67, 3 weeks ago
2 308 3 weeks ago
General · by Andy Miller, 3 weeks ago
0 310 3 weeks ago
General · by Veehem, 4 weeks ago
0 263 4 weeks ago
General · by milkboy, 4 weeks ago
0 264 4 weeks ago
General · by ian russell, 1 month ago
2 335 1 month ago