I'm using Highslide.full.js, version 4.1.13, and opening a window containing html text (and an image). I'm using the following code:
Code: Select all
<a href='#' onclick='return hs.htmlExpand(this, { width: "575", headingText: "myHeading", wrapperClassName: "titlebar" } )'><div class='bullet' id='bullet0'> </div><h3>Thumbnail caption</h3></a><div class='highslide-maincontent'><p><img ...>Expansion window text...
The problem is the { width: "575" }. When I view the website with an iPhone, the width of the expansion window is considerably wider than the phone screen. If I change the width to 260, it works in the phone in portrait mode, but is too short for landscape, and of course looks silly on a desktop. Width: "400" is better for phones in landscape, but is too wide for portrait.
One obvious answer is to eliminate the width setting in the html and supply it with CSS, using media queries to send the correct width to the various screen sizes. I've been trying to do that, but with no success. Perhaps I'm not finding the correct CSS class to define the width. Is hardcoding the width in the html mandatory?
Or have you come up with another way to target phones and adapt for the phone's orientation?