Помощник
|
Головоломка с отображением исходного кода |
vadimon
|
Сообщение
#1
|
||
|
|
||
|
|||
FightInGlory |
10.12.2010, 19:09;
Ответить: FightInGlory
Сообщение
#2
|
|
<!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>Untitled Document</title> <style type="text/css"> *{ padding:0; margin:0; } #container { width:900px; margin:0 auto; position:relative} #block1, #block2, #block3 { width:300px; background:#CCCCCC; display:inline; position:absolute; top:0;} #block1 p, #block2 p, #block3 p {padding:10px;} #block3{ right:0; } #block2{ left:0; } #block1{ left:300px; } </style> </head> <body> <div id="container"> <div id="block1"> <h2>Блок №1</h2> <p>Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p> </div> <div id="block2"> <h1>Блок №2</h1> <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 id="block3"> <h3>Блок №3</h3> <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. The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.</p> </div> </div> </body> </html> |
|
|
Zippovich |
10.12.2010, 20:57;
Ответить: Zippovich
Сообщение
#3
|
|
так теряется height container-а (абсолют выдергивает блоки из стандартного потока и height надо выставлять под container фиксированный)
вот так так сделайте, что бы не терять height: [CSS]#block1 {display: inline-block} #block2 {float: left} #block3 {float: right}[/CSS] |
|
|
FightInGlory |
11.12.2010, 11:57;
Ответить: FightInGlory
Сообщение
#4
|
|
|
данный способ работает не во всех браузерах, для ослов придется прописывать отдельные стили.
|
|
|
||
|
Похожие темы
Тема | Ответов | Автор | Просмотров | Последний ответ | |
---|---|---|---|---|---|
Дайте, пожалуйста, фрагмент кода на джаваскрипте для калькулятора на сайте | 3 | re-search | 1379 | 7.7.2019, 15:20 автор: web-coder |
|
Чистка вредного кода на сайтах WP | 0 | SkyFire | 2301 | 24.12.2017, 11:30 автор: SkyFire |
|
Нужна помощь в изменении кода сайта. | 6 | sanuzelservice | 5921 | 2.12.2015, 15:07 автор: -sanuzelservice- |
|
Проблема с отображением верстки в Safari | 0 | Razorio | 2984 | 9.11.2015, 19:38 автор: -Razorio- |
|
Услуги по валидации кода | 37 | alizid1 | 14070 | 31.1.2015, 15:02 автор: kstnews |
Текстовая версия | Сейчас: 25.4.2024, 6:16 |