Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Leon 101 posts 489 karma points
    Mar 13, 2015 @ 11:23
    Leon
    0

    Umbraco 7 grid partial view macro image width in design view goes outside the grid

    Hello.

    I've written a partial view macro that takes an image as one of the parameters. In the content "design view" (not preview), the image goes outside of the grid column. With a normal image that doesn't happen. How can I get my partial view macro to behave like a normal image and stay within the borders of the grid column in the design view? (It works fine in the page preview).

    Leon

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 15, 2015 @ 09:52
    Jan Skovgaard
    0

    Hi Leon

    Are you still having this issue? Could you perhaps share a screendump displaying the issue? Perhaps it's a matter of using max-width:100% in your styling?

    Looking forward to hearing from you.

    /Jan

  • Leon 101 posts 489 karma points
    Mar 16, 2015 @ 10:33
    Leon
    0

    Hi Jan.

    As long as I know there is a way of getting the image to fit within the grid in the design view (partial view macro), I can try and work out a way of achieving that. Do you think I need to edit the RTE.css?

    Here is a screen shot.

    enter image description here

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Mar 16, 2015 @ 18:51
    Jan Skovgaard
    0

    Hi Leon

    Yeah I think you should try either rte.css or style.css and see if you can add img{max-width:100%} so the image will automatically scale to fit the container so it does not look broken.

    Hope this helps.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft