logo

NJP

Wrapping Long URLs and Images with CSS

Import · Jun 10, 2014 · article

If images in your document are extending to the point of no return in your browser, here's a way to adjust a long URL to "wrap" your content into view. This will save you valuable time scrolling around trying to view content and also balance the layout of your design.

To adjust the size of the image and set boundaries to your content, add a max-width of 100% and "auto" for height to the CSS:

img {

max-width: 100%;

height: auto;

}

You can change this view:

image

To this view:

image

This quick fix should help improve the layout and make cross-platform viewing a scroll-free adventure.

For information about wrapping text in Activity lists with CSS, see Text added in work notes should wrap despite long, unbreakable lines (KB0529539).

View original source

https://www.servicenow.com/community/in-other-news/wrapping-long-urls-and-images-with-css/ba-p/2269747