2016-09-16 80 views
0

我很难试图修复DIV的位置。 浏览器中的代码和位置似乎没问题。CSS:相对位置和向左浮动导致不良位置。

但在Dreamweaver中预览DIV是分配的空间之外:

enter image description here

这个问题似乎是 “浮动:左” 上.th_block_info_container(21号线)

这是什么影响网站或只是一个Dreamweaver的问题?

任何帮助将不胜感激。

谢谢。

<!doctype html> 
 
<html> 
 
<head> 
 
<link href="https://fonts.googleapis.com/css?family=Abel|Roboto+Condensed:300,300i,400,400i,700,700i" rel="stylesheet"> 
 
<meta charset="UTF-8"> 
 
<style type="text/css"> 
 
body,td,th { 
 
\t font-family: 'Roboto Condensed', sans-serif; 
 
\t font-style: normal; 
 
\t font-weight: normal; 
 
\t font-size: 12px; 
 
\t background-color:#f5f8fa; 
 
\t color:#292f33; 
 
} 
 
.profile_sidebar{width:306px; height:800px;float:left;margin:0 18px 0 18px;line-height:800px; text-align:center;background-color:#ffffff;} 
 
.block_section_header{width:954px;float:left; height:18px;line-height:18px;} 
 
.block_section_title {width:468px;float:left; height:18px;line-height:18px;font-size:18px;color:#666666; letter-spacing:1px;} 
 
.block_section_viewall {width:468px;float:right;height:18px;text-align:right;font-size:12px; font-weight:400; letter-spacing:1px; line-height:18px;} 
 
.th_block_container {width:304px;height:268px;border:solid 1px #e1e8ed;float:left;margin:18px 18px 0 0;} 
 
.th_block_thumbnail {width:304px;height:215px; background-color:#b4b9bd; border-bottom:solid 1px #e1e8ed;} 
 
.th_block_info_container {width:241px;height:44px; font-size:12px; text-transform:uppercase;padding:9px 0 0 9px; float:left;} 
 
.th_block_title { width:225px;font-size:14px; height:14px;font-weight:400; margin-bottom:4px; color:#80817c;overflow:hidden;line-height:14px;position:relative;} 
 
.th_block_title span {position:absolute;white-space: nowrap;transform:translateX(0);transition: 1s;} 
 
.th_block_title:hover span {transform: translateX(calc(225px - 100%));} 
 
.th_block_talent {width:225px;font-size:12px;height:14px; color:#3fb0ac;font-weight:400;overflow:hidden;line-height:14px;position: relative;} 
 
.th_block_talent span {position:absolute;white-space: nowrap;transform:translateX(0);transition: 1s;} 
 
.th_block_talent:hover span {transform: translateX(calc(225px - 100%));} 
 
.th_block_quality {width:53px; height:53px;border-left:solid 1px #dddddd;text-align:center;line-height:53px;font-weight:bold;font-size:18px;color:#666666; float:left;} 
 

 
.ad_horizontal_talent {color:#FF3366;width:954px;height:108px;margin:18px 0; background-color:#f5f8fa; line-height:108px; text-align:center;border:solid 1px #e1e8ed;font-weight:bold;font-size:18px;color:#666666;} 
 

 
</style> 
 
<title>United Pornstars Profile Template</title> 
 
</head> 
 

 
<body> 
 
<div style="width:1332px; height:800px;margin:0 auto;"> 
 
<div class="profile_sidebar"></div> 
 
<div style="width:972px; height:100%; float:left; background-color:#ffffff; padding:18px 0 18px 18px;"> 
 

 
<!-- Scene Block --> 
 
<div class="block_section_header"> 
 
<div class="block_section_title">SECTION TITLE</div> 
 
<div class="block_section_viewall">VIEW ALL</div> 
 
</div> 
 

 
<div class="th_block_container"> 
 
\t <div class="th_block_thumbnail"></div> 
 
    <div class="th_block_info_container"> 
 
    \t <div class="th_block_title"><span>The quick brown fox jumps over the lazy dog</span></div> 
 
     <div class="th_block_talent"><span>NAME, NAME 2, NAME 3</span></div> 
 
    </div> 
 
    <div class="th_block_quality">4K</div> 
 
</div> 
 

 
<div class="th_block_container"> 
 
\t <div class="th_block_thumbnail"></div> 
 
    <div class="th_block_info_container"> 
 
    \t <div class="th_block_title"><span>The quick brown fox jumps over the lazy dog</span></div> 
 
     <div class="th_block_talent"><span>NAME</span></div> 
 
    </div> 
 
    <div class="th_block_quality">4K</div> 
 
</div> 
 

 
<div class="th_block_container"> 
 
\t <div class="th_block_thumbnail"></div> 
 
    <div class="th_block_info_container"> 
 
    \t <div class="th_block_title"><span>The quick brown fox jumps over the lazy dog</span></div> 
 
     <div class="th_block_talent">NAME</div> 
 
    </div> 
 
    <div class="th_block_quality">4K</div> 
 
</div> 
 
<div style="clear:both"></div> 
 
<div class="th_block_container"> 
 
\t <div class="th_block_thumbnail"></div> 
 
    <div class="th_block_info_container"> 
 
    \t <div class="th_block_title">Lorem Ipsum</div> 
 
     <div class="th_block_talent">NAME</div> 
 
    </div> 
 
    <div class="th_block_quality">4K</div> 
 
</div> 
 

 
<div class="th_block_container"> 
 
\t <div class="th_block_thumbnail"></div> 
 
    <div class="th_block_info_container"> 
 
    \t <div class="th_block_title">Lorem Ipsum</div> 
 
     <div class="th_block_talent">NAME</div> 
 
    </div> 
 
    <div class="th_block_quality">4K</div> 
 
</div> 
 

 
<div class="th_block_container"> 
 
\t <div class="th_block_thumbnail"></div> 
 
    <div class="th_block_info_container"> 
 
    \t <div class="th_block_title">Lorem Ipsum</div> 
 
     <div class="th_block_talent">NAME</div> 
 
    </div> 
 
    <div class="th_block_quality">4K</div> 
 
</div> 
 

 
<!-- END Scene Block --> 
 

 

 
</div> 
 
</div> 
 
</body> 
 
</html>

+0

我不会在Dreamweaver中花费一秒时间预览任何东西,如果该网站适用于Chrome,Firefox和IE10 +或任何版本首选项(Mac和Win版本),则可能会忽略所有的怪癖。不是我会在Dreamweaver中花费第二个编写代码:) – Roope

+0

我认为这已经是dreamweaver的“问题”了......在Visual Studio中创建网页时,发生这种情况也是如此 – TwoDent

回答

0

Dreamweaver中有时不能编译代码非常好(至少在我开发的,在Dreamweaver 8岁),放松。

在您最需要的浏览器中测试您的代码。

在这里检查你自己的例子,一切都对齐,像一个魅力工作。