Jump to content
  • 0

едет верстка и не все элементы центруются


maxsnw
 Share

Question

Здравствуйте такая проблемка при верстке возникла, что при изменении маштаба хедер и контент выравниваются по центру, а футер прикреплен к левому краю, в css указан margin: 0 auto; для wrapper. Плюс весь текст остается так же у левого края. Как зацепить его к элементам? пример ниже, сорри если криво вставил. За нижнюю часть не надо говорить пока ибо не доделал, наткнувшись вот на эту дрянь, да и на чистоту кода пока не грешите :) В общих чертах:)

<!DOCTYPE html><html lang="en"><head>	<meta charset="UTF-8">	<link href='http://fonts.googleapis.com/css?family=Roboto:300&subset=latin,cyrillic-ext' rel='stylesheet' type='text/css'>	<link rel="stylesheet" type="text/css" href="styles/normalize.css">	<link rel="stylesheet" type="text/css" href="styles/style.css">	<link rel="shortcut icon" type="image/png" href="img/favicon.png">	<title>Portfolio site</title></head><body><div id="wrapper"><header class="header">	<div class="header-img">		<img src="img/headerbg.jpg">	</div>	<div class="clearfix"></div>		<div class="nav">		<span class="head">Ali Sayed’s <br /> <b>Web Designing</b> <br /> Project</span>		<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore.		<p>		quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dol.	</div></header><div class="clearfix"></div><div class="content">	<div class="vertical">		<img src="img/contentbg.jpg">		<div class="content-text">			<h2>Drawing Scketch</h2>			<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidu.</p>			<h2>Making Design</h2>			<p>			Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidu.			</p>			<h2>Developing Product</h2>			<p>			Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidu.			</p>		</div>		<div class="best-strating">			<h2>Best Strarting</h2>				<p>Lorem ipsum dolor sit amet, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex  consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore.quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea.</p>				<input type="button" value="View Our History">			</div>			<div class="Verified">				<h2>Verified Dummy</h2>				<p>Lorem ipsum dolor sit amet, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex  consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore.quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea.</p>				<input type="button" value="Go To The Page">			</div>		</div>									</div>	</div><div class="clearfix"></div><footer class="footer"><image src="img/footerbg.jpg"><div class="vert-footer">		<span class="head-footer">This Webpage Is <br /> <b>Designed By</b></span>	<img src="img/logo.jpg">	<p>	<span class="name">Ali Sayed</span><br/>	<span class="graphic">Graphic Designer</span></div><div class="form">		<h2>Say ‘Hello’</h2>	<input type="name" value="Your Name">	<input type="email" value="Your Email">	<input type="comment" value="Your Message Here..."></div>	<div class="social">		<h4>Stay Connnected With Us...</h4>		<ul>			<li class="facebook"><a href="facebook.com"><img src="img/facebook.jpg"></a></li>			<li class="dribble"><a href="dribble.com"><img src="img/dribble.jpg"></a></li>				<li class="twitter"><a href="twitter.com"><img src="img/twitter.jpg"></a></li>		</ul>		<p>Please Feel Free To Contat With me For Any Kind of Prject.</p>	</div></footer></div>	</body></html>
#wrapper {	margin: 0 auto;	min-width: 240px;	max-width: 1370px;	font-family: 'Roboto', sans-serif;}.clearfix {	clear: both;}.header {	margin-bottom: -4px;}.header img {	display: inline-block;	position: relative;	width: 1370px;	height: auto;	}.nav {	display: inline-block;	position: absolute;	color: #000;	top: 135px;	left: 950px;	width: 321px;	height: 450px;}p {	padding-bottom: 25px;	line-height: 25px;	}.head {	display: inline-block;	padding-bottom: 35px;	text-decoration: none;	line-height: 55px;	font-size: 40px;}.vertical img {	display: inline-block;	position: relative;	margin-bottom: -4px;}.content-text {	position: absolute;	top: 800px;	left: 90px;	width: 450px;	height: 700px;	color: white;}.best-strating {	position: absolute;	top: 800px;	width: 530px;	height: 280px;	color: #000;	left: 700px;}.Verified {	position: absolute;	width: 530px;	height: 280px;	top: 1200px;	left: 700px;	color: #fff;}.vert-footer {	position: absolute;	top:1650px;	left: 50px;	height: 560px;	width: 340px;	color: #fff;}.vert-footer .head-footer {	display: inline-block;	padding-bottom: 70px;	font-size: 45px;	line-height: 80px;}.vert-footer img {	display: inline-block;	padding-top: 162px;	padding-bottom: 30px;}.name {	display: inline-block;	font-size: 42px;	margin-bottom: 	0px;	}.graphic {	display: inline-block;	font-size: 16px;	margin-top: 10px;}

bd69c546495a.jpg

Edited by maxsnw
Link to comment
Share on other sites

3 answers to this question

Recommended Posts

  • 0

не помогло :) Хотя у меня такая проблема возникла, работаю пока на 13 дюймах и вот решил проверить поведение сайта при большем разрешении...Маштабирование к нему относится или же нет?

Edited by maxsnw
Link to comment
Share on other sites

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