Hi ,

The light box is showing only 95% of the background color (width) in the pop up of the webiste and also in the image gallery of the website,while viewing the site in ipad.
URL is http://demo.alagappaarts.com
Hoping for solution .. Thanks.

Comments

dddave’s picture

Project: Drupal core » Lightbox2
Version: 6.20 » 6.x-1.x-dev
Component: other » Miscellaneous

This isn't a core issue.

mugunthan’s picture

is it because of Ipad settings?

patrickroma’s picture

subscribe

Wan’s picture

subscribe

Wan’s picture

Status: Active » Closed (works as designed)
Issue tags: -Needs documentation

I found a solution to this issue... you simply feed the iPad the width of your website in a meta tag (meta name="viewport") and then when the screen size is calculated by Lightbox2 the correct width is returned from the iPad. Other browsers ignore this tag.

Add the following two lines to yourthemename_theme_preprocess_page() function in template.php

	drupal_set_html_head('<meta name="viewport" content="width=1000" />');
	$vars['head'] .= drupal_get_html_head();

Substitute '1000' for the width of your webpage.

I discovered this using the following two pages:
http://x7.fi/2010/02/12/how-to-fit-your-website-for-the-apple-ipad/
http://api.drupal.org/api/drupal/includes--common.inc/function/drupal_se...

ps I'm not too sure what to set the status to... eel free to change to something more appropriate.

dddave’s picture

Title: Light box is not fully shown in ipad » Light box is not fully shown in ipad/iphone
Issue tags: +Needs documentation, +meta, +iphone, +ipad, +viewport

If someone else can confirm this solution without the occurrence of other problems this can be set to fixed.

This might need documentation though.

Wan’s picture

Confirmed fixed for iphone too.

woop_light’s picture

In Drupal 7, is there anything wrong with simply adding it to the of your html.tpl.php template file for your theme?

I hijacked the "Framework" theme, and it does just that. Copied directly from the html.tpl.php template for "Framework":

<head>
  <?php print $head; ?>
  <!-- Set the viewport width to device width for mobile -->
  <meta name="viewport" content="width=device-width" />
  <title><?php print $head_title; ?></title>
  <?php print $styles; ?>
  <?php print $scripts; ?>
  <!-- IE Fix for HTML5 Tags -->
  <!--[if lt IE 9]>
    <script src="http://html5shiv.googlecode.com/svn/trunk/html5.js"></script>
  <![endif]-->
</head>

Rather than content="width=device-width" I'm going to play around with different widths to see what works best. I'm just beginning to mess around with this, so please feel free to chime in.

woop_light’s picture

Version: 6.x-1.x-dev » 7.x-1.x-dev
Status: Closed (works as designed) » Active
Issue tags: +Needs documentation

[edit: accidental dup]