Mobile app version of vmapp.org
Login or Join
Berryessa370

: Google Sites: code block - how to disable wrapping I'm using Google Sites to host the wiki-like website. I noticed that code blocks have text wrapped in them. Instead, I would like to have

@Berryessa370

Posted in: #Code #GoogleSites

I'm using Google Sites to host the wiki-like website.

I noticed that code blocks have text wrapped in them. Instead, I would like to have the code non-wrapped and with horizontal scrollbar when needed. Has anyone accomplished this?

I would like to do this without Html-markup editing of each post that contains a code block.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Berryessa370

1 Comments

Sorted by latest first Latest Oldest Best

 

@Nimeshi995

You can accompish this by editing the CSS styling of the block quote so there's no need to remove the quote block as this would be bad for SEO purposes.

Typical Example of a Scroll-bar within Block Quote:

blockquote {
width:600px;
max-height:150px;
overflow-y:scroll;
}


I made a online demo so you can take a look of it in action, here is the fiddle link.

If you still want to proceed without doing blockquote then you can use a div element such as: <div class="quote"> </div> and just copy the styling options from the blockquote

To edit this in Google sites you use Insert Custom, HTML, JavaScript, CSS.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme