Jump to content
  • 0

Выравнивание по центру


Markelok
 Share

Question

Здравствуйте. Помогите выравнить блоки/шторки по центру.
 
Скриншот:

300f1703d1c662ed3c0c40c2587d6098.png

 

Нужно что бы эти блоки были по центру.

 

Вот код:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml">     <head>	         <title>Красивые шторки</title>             <meta http-equiv="Content-Type" content="text/html; charset=windows-1251" />             <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>            <script type="text/javascript" src="js/jquery.easing.1.3.js"></script><script type="text/javascript">$(document).ready(function() {	$('.eff').hover(	function () {		value = $(this).find('img').outerHeight() * -1;		$(this).find('img').stop().animate({bottom: value} ,{duration:500, easing: 'easeOutBounce'});				},	function () {				$(this).find('img').stop().animate({bottom:0} ,{duration:500, easing: 'easeOutBounce'});			});		$('.eff').click(function () {			window.location = $(this).find('a:first').attr('href');	});	});</script><style>body {font-family:arial;}a {color:yellow;}.eff {		width:136px;	height:136px;	position:relative;	overflow:hidden;	float:left;	display:inline;	margin:8px;	font-size:12px;}.eff img {	display:block;	width:126px;	height:126px;		text-decoration:none;	border:4px solid #ccc;	background:#ddd;	position:absolute;	z-index:500;	cursor:pointer; cursor:hand;}.eff .caption {	width:126px;	height:126px;	background:#333;	border:4px solid #ccc;	color:#eee;	position:absolute;	top:0; left:0;	z-index:0;}.eff .caption a.header {	margin:10px 5px 5px 5px;	display:block;	font-size:14px;		font-weight:700;	color:#4ed7f4;}.eff .caption p {	margin:5px;	}.clear {clear:both}</style></head><body><div class="eff">	<img src="1.gif" alt="Тест 1" title="" width="126" height="126" />	<div class="caption">	     <a href="#" class="header">Заголовок 1</a>	     <p>Тут может быть помещен любой поясняющий текст. <a href="#">Cсылка</a></p>	</div></div><div class="eff">	<img src="2.gif" alt="Тест 1" title="" width="126" height="126" />	<div class="caption"><a href="#" class="header">Заголовок 2</a>	     <p>Тут может быть помещен любой поясняющий текст.</p>	</div></div><div class="eff">	<img src="3.gif" alt="Тест 1" title="" width="126" height="126" />	<div class="caption">	     <a href="#" class="header">Заголовок 3</a>	     <p>Тут может быть помещен любой поясняющий текст.</p>	</div></div><div class="clear"></div></body></html>
Link to comment
Share on other sites

8 answers to this question

Recommended Posts

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. See more about our Guidelines and Privacy Policy