0

在过去的两周里,我在这里阅读了很多答案,但似乎找不到解决我问题的正确方法。有人能帮忙吗?

我正在尝试构建我的第一个响应式网站,并且正在使用 Dreamweaver 的流体模板。但是,我不能防止我的右下对齐导航重叠在我的顶部徽标和标语 div 层上,并且不能让我的导航表在手机上查看时缩小?

我有一个 gridContainer,三个 800px 宽的 div 叠放在一起(在较小的门户上查看时会缩小以适应):
Div id: header
Div id: logo 和
Div id: tag

在此之下,我有三个左侧浮动的较窄 div(60% 宽)(在较小的门户上查看时会缩小以适应):
Div id:body
Div id:边框和
Div id:bookus

最后,一个导航 div(30% 宽):
div id: contact

此导航 div 是一个翻转图像表,这些图像由一堆 crate 组成,其中每个 crate 是一个链接。因此,我需要它保持在浏览器窗口的底部,无论它打开到多大,而且如果窗口被调整为更小,也不要与 Logo 和 Tag div 重叠。(对于较小的门户,我无法使其按比例缩小)

这是我的 CSS(抱歉,我不确定需要多少信息):

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

.gridContainer {
margin-left: auto;
margin-right: auto;
width: 84.9333%;
min-height: 600px;
padding-left: 3.0333%;
padding-right: 3.0333%;
padding-top: 3.0333%;
padding-bottom: 0;
top: 10%;
}

#header {
clear: both;
float: left;
margin-left: 0;
margin-top: 15%;
margin-bottom: 10px;
width: 60%;
height: auto;
display: block;

}

#logo {
clear: both;
float: left;
margin-left: 0;
margin-top: 10%;
width: 60%;
height: auto;
display: block;

}

#tag {
clear: both;
float: left;
margin-left: 0;
margin-bottom: 10px;
width: 60%;
height: auto;
display: block;
}

#body {
clear: both;
float: left;
margin-left: 0;
margin-top: 10px;
margin-bottom: 0px;
width: 60%;
display: block;
}

#border {
clear: both;
float: left;
margin-left: 0;
width: 60%;
display: block;
}

#bookus {
clear: both;
float: left;
margin-left: 0;
margin-top: 10px;
margin-bottom: 0px;
width: 60%;
display: block;
}

#contact {
clear: both;
float: right;
margin-right: 0;
margin-top: 10px;
margin-left: 60%;
margin-bottom: 0;
width: 30%;
height: auto;
display: block;
position: absolute;
bottom: 0;
min-height: 158px;
min-width: 132px;
table-layout:auto;
}


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

@media only screen and (min-width: 481px) {

.gridContainer {
width: 86.8%;
min-height: 800px;
max-height: 100%;
padding-left: 3.1%;
padding-right: 3.1%;
padding-top: 3.1%;
padding-bottom: 0;
top: 10%;
}

#header {
clear: both;
float: left;
margin-left: 0;
margin-top: 15%;
margin-bottom: 10px;
width: 80%;
height: auto;
display: block;

}

#logo {
clear: both;
float: left;
margin-left: 0;
margin-top: 10%;
margin-bottom: 5px;
width: 80%;
height: auto;
display: block;

}

#tag {
clear: both;
float: left;
margin-left: 0;
margin-bottom: 5px;
width: 80%;
height: auto;   
display: block;
}

#body {
clear: both;
float: left;
margin-left: 0;
margin-top: 10px;
margin-bottom: 0px;
width: 60%;
display: block;
}

#border {
clear: both;
float: left;
margin-left: 0;
width: 60%;
display: block;
}

#bookus {
clear: both;
float: left;
margin-left: 0;
margin-top: 10px;
margin-bottom: 0px;
width: 60%;
display: block;
}

#contact {
clear: both;
float: right;
margin-right: 0;
margin-left: 60%;
margin-top: 10px;
margin-bottom: 0;
width: 30%;
display: block;
position: absolute;
bottom: 0;
min-height: 158px;
min-width: 132px;
table-layout:auto;

}

}


/* 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: 84%;
max-width: 800px;
min-height: 800px;
max-height: 1180px;
padding-left: 3%;
padding-right: 3%;
padding-top: 3%;
padding-bottom: 0;
margin: auto;
top: 10%;
}

#header {
clear: both;
float: left;
margin-left: 0;
margin-top: 15%;
margin-bottom: 10px;
width: 100%;
display: block;

}

#logo {
clear: both;
float: left;
margin-left: 0;
margin-top: 10%;
margin-bottom: 10px;
width: 100%;
height: auto;
display: block;

}

#tag {
clear: both;
float: left;
width: 100%;
height: auto;
margin-left: 0;
margin-bottom: 10px;
display: block;
}

#body {
clear: both;
float: left;
margin-left: 0;
margin-top: 0px;
margin-bottom: 10px;
width: 60%;
display: block;
}

#border {
clear: both;
float: left;
margin-left: 0;
width: 60%;
display: block;
}

#bookus {
clear: both;
float: left;
margin-left: 0;
margin-top: 10px;
margin-bottom: 0px;
width: 60%;
display: block;
}

#contact {
clear: both;
float: right;
margin-right: 30%;
margin-left: 50%;
margin-top: 10px;
margin-bottom: 0;
width: 30%;
height: 30%;
min-height: 158px;
min-width: 132px;
display: block;
position: absolute;
bottom: 0px;
table-layout:auto;
}

}

这是我的导航表的 html 源代码,(我需要添加更多吗?):

<div class="contact" id="contact" align="right">
<table width="100%" height="100%"border="0" cellspacing="0" cellpadding="0" style="position:absolute; bottom:0;height:auto; width:auto; max-width:265px; max-height:296px;">
  <tr>
    <td><a href="mailto:email@url.co.uk" target="_blank"><img src="00_assets/buttons/00_BUTTONS_EMAIL.png" alt="email us" name="email" width="265" height="86" id="email" onMouseOver="MM_swapImage('email','','00_assets/buttons/00_BUTTONS_EMAILO.png',1)" onMouseOut="MM_swapImgRestore()" border="0" align="absbottom" style="height:auto; width:auto; max-width:265px; max-height:86px;"></a></td>
  </tr>
  <tr>
    <td><a href="tel:+123-456-7890" target="_blank"><img src="00_assets/buttons/00_BUTTONS_CALL.png" alt="call us" name="call" width="265" height="70" id="call" onMouseOver="MM_swapImage('call','','00_assets/buttons/00_BUTTONS_CALLO.png',1)" onMouseOut="MM_swapImgRestore()" border="0" align="absbottom" style="height:auto; width:auto; max-width:265px; max-height:70px;"></a></td>
  </tr>
  <tr>
    <td><a href="https://www.url.com/" target="_blank"><img src="00_assets/buttons/00_BUTTONS_FB.png" alt="like us" name="fb" width="265" height="70" id="facebook" onMouseOver="MM_swapImage('facebook','','00_assets/buttons/00_BUTTONS_FBO.png',1)" onMouseOut="MM_swapImgRestore()" border="0" align="absbottom" style="height:auto; width:auto; max-width:265px; max-height:70px;"></a></td>
  </tr>
  <tr>
    <td><a href="https://twitter.com/intent/tweet?screen_name=twitterid" target="_blank"><img src="00_assets/buttons/00_BUTTONS_TWEET.png" alt="mention us" name="tweet" width="265" height="70" lowsrc="00_assets/buttons/00_BUTTONS_EMAILO.png" id="tweet" onMouseOver="MM_swapImage('tweet','','00_assets/buttons/00_BUTTONS_TWEETO.png',1)" onMouseOut="MM_swapImgRestore()" border="0" align="absbottom" style="height:auto; width:auto; max-width:265px; max-height:70px;"></a></td>
  </tr>
</table>

非常感谢,提前。

4

0 回答 0