Jump to content
  • 0

Помогите новичку


pavlovda
 Share

Question

Здравствуйте участники форума помогите новичку с такими вопросами, решил сделать двухколоночный резиновый макет, код которого приведу ниже все получилось нормально, но если поменять блоки местами все съезжает не могу понять почему.Разъясните что я сделал неправильно.

 

И еще вот такой вопрос в некоторых источниках пишут, что нельзя задавать фиксированную высоту элемента насколько это правильно выскажите свое мнение 

<!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>	<meta http-equiv="content-type" content="text/html; charset=utf-8" />	<title></title>	<style>	*	{	margin: 0 ; 	padding: 0 ;	}		.main	{	width: 1200px ; 	overflow: hidden ;	margin: 0 auto ;	}		.left-bar	{	float: left ; 	width: 250px ;	min-height: 250px ;	background: skyblue ;	}		.content	{	background: orange ; 	}	</style></head><body><div class = "main">	<div class = "left-bar">		<p>left-bar</p>	</div>	<div class = "content">		<p>Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.</p>	</div></div></body></html>

Если поменять местами блоки content и left-bar все съезжает не пойму, где ошибка

Link to comment
Share on other sites

3 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