Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Colorbox change size of the image

  • This topic is empty.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #147583
    Kuzyo
    Participant

    Hi, everyone.

    I installed this lightbox plugin http://www.jacklmoore.com/colorbox/ on wordpress site . But have problem – I don’t know how to change size of the image:

    $(".gallery-anchor").colorbox({rel: "group",
          width:'95%', height:'95%'
      });
    

    this code changes only frame around image, but image stay the same (600px*400px). I tried change in the settings innerWidth and innerHeight but it didn’t help.
    Looking for advice. Thanks

    #147769
    ethieda
    Participant

    Why not just set the width and height on the img tag itself?

    <img src="image.png" width="400px" height="500px" alt="" />

    #147784
    Kuzyo
    Participant

    problem with js, plugin makes resizing as a result my css overrided

Viewing 3 posts - 1 through 3 (of 3 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.