Dreamweaver预览浏览器与实际网页HTML CSS不同

时间:2013-09-12 12:15:44

标签: html css dreamweaver liquid-layout

我创建了一个包含多个流体分区的网页。在网站浏览器中,它们应该是水平排列的。当页面实际上传到网站时,它们是垂直的,显示在另一个下面。

以下是使用的CSS表格:

@charset "utf-8";
@import url("Ubuntu_L/stylesheet.css");

/* Simple fluid media
   Note: Fluid media requires that you remove the media's height and width attributes from the HTML
   http://www.alistapart.com/articles/fluid-images/ 
*/
img, object, embed, video {
    max-width: 100%;
}
/* IE 6 does not support max-width so default to width 100% */
.ie6 img {
    width:100%;
}

/*
    Dreamweaver Fluid Grid Properties
    ----------------------------------
    dw-num-cols-mobile:     5;
    dw-num-cols-tablet:     8;
    dw-num-cols-desktop:    10;
    dw-gutter-percentage:   25;

    Inspiration from "Responsive Web Design" by Ethan Marcotte 
    http://www.alistapart.com/articles/responsive-web-design

    and Golden Grid System by Joni Korpi
    http://goldengridsystem.com/
*/

/* Mobile Layout: 480px and below. */

.gridContainer {
    margin-left: auto;
    margin-right: auto;
    width: 87.36%;
    padding-left: 1.82%;
    padding-right: 1.82%;
}
#LayoutDiv1 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv2 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv3 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv4 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv5 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv6 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv7 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv8 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv9 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}

/* Tablet Layout: 481px to 768px. Inherits styles from: Mobile Layout. */

@media only screen and (min-width: 481px) {
.gridContainer {
    width: 90.675%;
    padding-left: 1.1625%;
    padding-right: 1.1625%;
}
#LayoutDiv1 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv2 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv3 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv4 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv5 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv6 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv7 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv8 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv9 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
}

/* Desktop Layout: 769px to a max of 1232px.  Inherits styles from: Mobile Layout and Tablet Layout. */

@media only screen and (min-width: 769px) {
.gridContainer {
    width: 88.2%;
    max-width: 1232px;
    padding-left: 0.9%;
    padding-right: 0.9%;
    margin: auto;
}
#LayoutDiv1 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 59.1836%;
    display: block;
}
#LayoutDiv2 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 18.3673%;
    display: block;
}
#LayoutDiv3 {
    clear: none;
    float: left;
    margin-left: 2.0408%;
    width: 18.3673%;
    display: block;
}
#LayoutDiv4 {
    clear: none;
    float: left;
    margin-left: 2.0408%;
    width: 18.3673%;
    display: block;
}
#LayoutDiv5 {
    clear: none;
    float: left;
    margin-left: 2.0408%;
    width: 18.3673%;
    display: block;
}
#LayoutDiv6 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
#LayoutDiv7 {
    clear: none;
    float: left;
    margin-left: 2.0408%;
    width: 18.3673%;
    display: block;
}
#LayoutDiv8 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 18.3673%;
    display: block;
}
#LayoutDiv9 {
    clear: both;
    float: left;
    margin-left: 0;
    width: 100%;
    display: block;
}
}

我认为这是一个普遍存在的问题。任何建议都会非常感激!

谢谢你 -

安德鲁

编辑:

请参阅下面的html片段:

  <div id="LayoutDiv3">
<p><strong>Medical <br>
  </strong>&nbsp;Condition 1
  <input type="checkbox" name="Condition 1" value="Yes" />
  &nbsp;&nbsp; <br>
  Condition 2
  <input type="checkbox" name="Condition 2" value="Yes" />
  &nbsp;&nbsp; <br>
  Condition 3
  <input type="checkbox" name="Condition 3" value="Yes" />
  &nbsp;&nbsp; <br>
  Condition 4
  <input type="checkbox" name="Condition 4" value="Yes" /></p>
<br />
  <br />        
  </div>

  <div id="LayoutDiv4">
<p>  <strong>Dietary</strong>
<p>Type 1
  <input type="checkbox" name="Type1" value="Yes" />
  &nbsp;&nbsp; Type 2
  <input type="checkbox" name="Type 2" value="Yes" />
  &nbsp;
<p>&nbsp; Type 3
  <input type="checkbox" name="Type 3" value="Yes" />
  &nbsp;&nbsp; Type 4
  <input type="checkbox" name="Type 4" value="Yes" />

  <br />
  <br />
</div>

1 个答案:

答案 0 :(得分:0)

我尝试使用http://bradfrost.github.io/this-is-responsive/patterns.html#作为基本模板,然后最终按照我想要的方式工作。它确实需要重新启动并仅复制和粘贴相关代码。

尝试:http://bradfrost.github.io/this-is-responsive/patterns.html#

相关问题