Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

adding image class in Twine 2.x SugarCube

edited April 2015 in Help! with 2.0
in http://www.motoslave.net/sugarcube/docs/markup.html#images there's some way to add images in SugarCube but

how to add class to that images ? so i can styling the images using css for responsive purpose

Comments

  • I'd just wrap it in a span, personally.
    <span class="myimage">[img[http://lorempixel.com/400/200][next passage]]</span>
    You can target it in CSS the same way as you would if the image itself had a class, and it'll work regardless of whether or not it's wrapped in an A tag like the example above would be:
    .myimage img {
    width: 50%;
    height: auto;
    }
  • oh ic so that's really works then using native html tag because when i edit the Twine output file and add
    <img src="ring.jpg" alt="">
    it doesnt work

    but when add
    <img src="ring.jpg" alt="">
    in the editor it does works fine because the output became
    &amp;lt;img src=&amp;quot;ring.jpg&amp;quot; alt=&amp;quot;images&amp;quot;/&amp;gt;
    silly me LOL

    and thx for the answer, good job.

    btw i just add class in image tag using native html syntax and it does works
    <img class="my-images" src="ring.jpg" alt="this is awesome">
    i hope there's no issue add images just like that
Sign In or Register to comment.