CSS DIV WRAPPER

时间:2013-05-16 20:08:27

标签: css html

我现在已经尝试了几天将内容集中在包装div中。在这个div里面,我有另外3个div,一个在旁边,边缘和图像。 我在这些论坛上搜索了大部分代码(恭喜我),对编码几乎一无所知。

反正...

这是代码,如果有人能帮助我的话会很棒!

<!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" />

<link rel="shortcut icon" href="http://puente-aereo.net/clientes/perceptualweb/perceptual/ndxz-studio/imgs/perceptual.ico">

<meta name="keywords" content="perceptual, bench, perceptualstudio, diseño, mobiliario, interiores">

<meta name="description" content="Perceptual, Perceptual Studio, Bench">

<meta name="author" content="puente-aereo.net">

<title>Perceptual, Perceptual Studio, Bench</title>

<style media="screen" type="text/css">

.container {
    width: 1333px;
    margin: 0 auto;
}
.column {
    float: left;
    margin-right: 10px;
}
.spancol {
    width: 250px;
}
.last {
    margin-right: 0;
}
p {
    text-align: justify;
    margin-top: 10px;
    margin-right: 18px;
    margin-bottom: 10px;
    margin-left: 18px;
    font-family: Georgia, "Times New Roman", Times, serif;
    font-size: 11px;
    color: #666;
    word-wrap: normal;
    word-break: break-all;
}

</style>

</head>

<body>

<div align="center" class="container">

<div class="column spancol"><p>.................................................................................................................................................................................................................. ...... ..................... Marca de mobiliario / furniture brand .... .......................................................................................................
</p><a href="#"><img src="http://puente-aereo.net/clientes/perceptualweb/perceptual_hd.jpg"/></a>
<p>.............................................................................................................................................................................................................................................. diseñado y fabricado en Colombia / designed and manufactured in Colombia............................................................................................................................................................................ lineas simples /simple lines ............................ ...................................................................................................................................................................................................................................funcionalidad/ functionality................ .......................................................................................................................................................................................................................................atencion a los detalles / attention to details .... ...................................................................................................................... diseños atemporales / timeless design ................... ........................................................................................................................................................................................................................................................................................</p>
</div>

<div class="column spancol"><p>................................................................................................................................Estudio de diseño / design studio ......... ....................................................................</p><a href="#"><img src="http://puente-aereo.net/clientes/perceptualweb/perceptualstudio_hd.jpg"/></a>
<p>......................................................................................................................................................................... diseño comercial / commercial design ........................... ..................................................................................................................................................................................................................... .....diseño de producto / product design ................... .................................................................................................................................................................................................................................................................................................................................diseño corp  rativo / corporate design ................ ................................. ...............................................................................................................................................................................................................diseño residencial /residential design..............................................................................................................................................................................................................................................................................................................................................</p>
</div>

<div class="column spancol last"><p>..........................................................................................................................................................................................................................................................................fabricante de mobiliario/furniture manufacturing .................................. ................................... ..................................</p><a href="#"><img src="http://puente-aereo.net/clientes/perceptualweb/bench_hd.jpg"/></a>
<p>..................................................................... .......mobiliario  arquitectonico / architectural furniture ........... ............................................................................................................................................................................................................................................................................ desarrollo de mobiliario personalizado/custom furniture developement ........... ....................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................................</p>
</div>

</div>

</body>
</html>

1 个答案:

答案 0 :(得分:1)

Floated div导致.container没有高度。

http://jsfiddle.net/6zS7D/

您可以添加容器:

<div style="clear:both"></div>