Con questa situazione ho due problemi:
CSS:
codice:
/* reset */
html, body {margin:0; padding:0; border:0; width:100%; height:100%;}
/* font face */
@font-face {
font-family: 'Museo 500';
src: url('/templates/default/css/fonts/Museo500-Regular.eot');
src: local('Museo 500'), url('Museo500-Regular.otf');
src: local('Museo 500'), local('Museo-500'), url('/templates/default/css/fonts/Museo500-Regular.woff') format('woff'), url('/templates/default/css/fonts/Museo500-Regular.otf') format('opentype');
}
/* general settings */
body {background:none;}
#pop_container {display:table; width:100%; height:100%; max-height:100%; background:#f00;}
#pop_image {display:table-cell; height:100%; max-height:100%; background:#00f; text-align:center; vertical-align:middle;}
#image {display:table-cell; width:100%; height:100%; background:#ccc; }
#image img {display:inline; max-width:100%; max-height:100%;}
#pop_social {display:table-cell; width:300px; height:100%; background:#ff0; vertical-align:top;}
HTML:
codice:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="it" lang="it">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
<link rel="stylesheet" type="text/css" href="/templates/default/css/pop_screen.css" />
<title><?php echo getWindowTitle(); ?></title>
</head>
<body id="pop">
<div id="pop_container">
<div id="pop_image">
<div id="image">
[img][/img]
</div>
</div>
<div id="pop_social">
social
</div>
</div>
</body>
</html>
qui succede che:
1. l'immagine è allineata a sinistra.
2. se l'immagine è più alta del contenitore appare uno scroll come se il max.height non funzionasse, mentre se riduco la finestra del browser e ricarico la pagina il max-width funziona regolarmente. questo problema è presente ogni volta che metto il display table e table cell ai div.