Jump to content
php.lv forumi

div vertical align


cucumber

Recommended Posts

Ka lai panak, lai pedejais div butu lapas apaksha, piesaistits.

piem ta

#

#

 

 

 

#

 

<!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="en" lang="en">
 <head>
<title>One Hundred Percent height divs</title>
<style type="text/css" media="all">@import "style.css";</style>
</head>
<body>
  <div class="all">
		<div style="border: 1px solid red; height: 50px;">
		 #
		</div>
		<div style="border: 1px solid green;">
		 #
		</div>
		<div style="border: 1px solid blue; height: 25px;">
		 #
		</div>
	</div>	

</body>
</html> 

<!--
style.css

html, body {height: 100%; margin: 0px; padding:0px;}
.all 
{
padding: 0px;
morgin: 0px;
border: 0px solid #ccc;
height: 100%; 
width:  100%;
background-color: #ccc;
}
-->

Link to comment
Share on other sites

uzrakstiju variantu ar tabli , bet atkal gluks uz FF iet taka vajadzetu neparadas scrolling un ekrans stiepjas, bet uz IE tas iztpiepjas vairak neka vajaga, nevaru iebraukt kur ir problema?

 

<!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="en" lang="en">
 <head>
<title>One Hundred Percent height divs</title>
<style type="text/css" media="all">@import "style.css";</style>
</head>
<body>
	<table>
		<tr>
			<td>
				<div style="border: 1px solid red; height: 50px;">
				 #
				</div>
			</td>				
		</tr>
		<tr>
			<td style="height: 100%;">
				<div style="border: 1px solid green; height: 100%;">
				 #
				</div>
			</td>				
		</tr>
		<tr>
			<td>
				<div style="border: 1px solid blue; height: 50px;">
				 #
				</div>
			</td>				
		</tr>
	</table>
</body>
</html> 
<!--
html, body {height: 100%; margin: 0px; padding:0px;}
.all 
{
padding: 0px;
morgin: 0px;
border: 0px solid #ccc;
height: 100%; 
width:  100%;
background-color: #ccc;
}
-->

Link to comment
Share on other sites

×
×
  • Create New...