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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

General

Maximum text width on a page / page width?

Solved by Hugh Barnes View solution

Started by Sebastian Gonzato 4 years ago · 2 replies · 567 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 Jerry Hunt, 4 days ago
2 99 16 hours ago
General · by pamtbaau, 21 hours ago
1 63 21 hours ago
General · by Andy Miller, 1 day ago
0 48 1 day ago
General · by Marcel, 12 months ago
6 357 5 days ago
General · by Duc , 6 days ago
3 45 6 days ago