Skip to content

Adjusting width of posts #46

Closed Answered by hugo-sid
chrisxfire asked this question in Q&A
May 12, 2023 · 2 comments · 3 replies
Discussion options

You must be logged in to vote

Hi @chrisxfire.

Welcome to Hugo blog awesome discussions.

Solution

You have to change the value of $narrow-size and $spacing-full variables, which are defined in assets/sass/main.scss file.

Reasoning

The whole blog post is wrapped in a <div> with wrapper class. In order to change the width of text for individual posts, max-width property of this div should be changed.

.wrapper {
max-width: -webkit-calc(#{$narrow-size} - (#{$spacing-full} * 2));
max-width: calc(#{$narrow-size} - (#{$spacing-full} * 2));

As seen above, the value of max-width property is decided by the two variables $narrow-size

Replies: 2 comments 3 replies

Comment options

You must be logged in to vote
3 replies
@chrisxfire
Comment options

@caprinux
Comment options

@caprinux
Comment options

Answer selected by chrisxfire
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants