Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Can I narrow page width in Bitbucket Markdown?

Buday.Gergely.Istvan March 21, 2023

writes that

"The more code you can see on your screen, the easier it is to work with it. That’s why we broke away from our traditional fixed-width pages, and redesigned every page on Bitbucket to expand to the full width of your screen, as wide as your browser will allow."

I write my for documentation and having too wide lines makes it hard to read.

So this is not what I want, I disagree with the above quote.

I would like to have a Markdown command that sets the width of the text body.

Is this possible in Bitbucket Markdown?

1 answer

2 votes
Riley Venable
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 21, 2023
Bitbucket Markdown does not have a command for setting the width of the text body. However, you can add CSS styles to your README to control the layout and appearance of the text. You can do this by adding a `<style>` tag to the top of your file and defining the styles you want to use. Keep in mind that these styles will only be applied when the README is viewed in a web browser, and may not be honored by all Markdown viewers.
Buday.Gergely.Istvan March 27, 2023

I added the style tag at the very first line of but it was displayed in verbatim both with Firefox and Chrome:

<style> article { width: 80em } </style>

(copy from the web page through the browser)

What shall I do?

Buday.Gergely.Istvan March 27, 2023

Also, I have found this:

asking how to add custom CSS to a Markdown page.

Is it allowed now? And, where is it officially documented?

Buday.Gergely.Istvan March 27, 2023

says that embedded HTML is shipped:

"The Bitbucket Cloud team has successfully shipped this feature to our customers!"

but I do not see in the Markdown documentation:

how I could do embedded HTML.

Michael Leibl
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 30, 2023

I agree with Buday_Gergely_Istvan. should not span the full width of my screen. It's not readable. Imagine this thread would be 100% of this window.

Also setting it to 1200px is not a good idea:

A solution would be some fixed number of "em". Because this translates into a fixed number of characters per line, which is exactly what we needfor readability.

Like Buday.Gergely.Istvan likes this
Michael Leibl
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 31, 2023

I tried adding

<style type="text/css" rel="stylesheet"> div { max-width: 50em; } </style>

in the first line of the

It works in the preview of VS Code but did not work on Bitbucket Server 7.19.3. It's not shown in verbatim, just not shown at all and not effect.

Like Buday.Gergely.Istvan likes this

Suggest an answer

Log in or Sign up to answer
Site Admin
AUG Leaders

Atlassian Community Events