I want to insert a banner image in a content editor, is it possible to have this image resize based on the size of the respective user's screen? Any help is appreciated


Usually you can have the image relative to the screen page. Just use the content editor to also insert a tag to allow that image to be 100% width, display block, and set a max-height, then it should shrink based on the browser's size or resolution.

  .imgbanner {
      display: block;
      width: 100%;
      height: auto;
      <img class="imgbanner" src="http://www.w3schools.com/tags/smiley.gif" />

If you are using content editor you can try JavaScript for image resize by resolution. I recommend adding JS into a html file and calling that file into Content editor.

For image resize using JS check this link https://stackoverflow.com/questions/4572621/auto-image-resize-based-on-browser-window-dimensions

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.