网页布局_html/css_WEB-ITnose
初学者,对于自己布局比较困难,使用的是现有网页的模板,上中下结构,中间又分为左右两部分,左边是导航选项,点击后ajax更新右边的内容,现在的问题是我是直接使用的1330固定的宽度,浏览器没有全屏的时候,右边显示的表格就会掉下去,怎么固定在右边不掉啊,谢谢啊
nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script></script>
<script></script>
<script></script>
.bigclass {
background-repeat: no-repeat;
background-position: left center;
height: 25px;
width: 150px;
font-size: 18px;
font-style: normal;
font-weight: bold;
text-decoration: none;
text-align: left;
text-indent: 25px;
vertical-align: middle;
line-height: 26px;
cursor: hand;
background-image: url(../images/header13.gif);
margin-bottom: 6px;
margin-left: 31px;
margin-right: 0px;
margin-top: 11px;
padding-bottom: 0px;
padding-left: 0px;
padding-right: 0px;
padding-top: 1px;
}
.smallclass{
width: 150px;
height: 20px;
line-height: 7px;
}
.hiddendiv {
FILTER: alpha(Opacity=70);
margin: 0px;
padding: 0px;
height: 44px;
width: 150px;
}
.blankdiv {
background-attachment: fixed;
background-repeat: repeat;
background-position: center center;
margin: 0px;
padding: 0px;
height: 27px;
width: 150px;
}
body{
background-color:#f0f0f0;
font-size:12px;
height: 100%;
margin:0 auto;
padding:0px;
}
a{
cursor: hand;
color: #0000FF;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
div{
/*border: 1px #000000 solid;*/
}
#contain{
position: relative;
margin:0 auto;
padding:0px;
/*background-color:#FFFFFF;*/
width: 100%;
height: auto;
text-align: center;
}
#contain #header{
position: relative;
text-align: right;
background-image: url(../images/headerlogo.gif);
background-position: center bottom;
background-repeat:no-repeat;
line-height: 36px;
width: 1310px;
height: 90px;
top:20px;
left:20px;
}
#contain #left{
position: relative;
left: 20px;
top:20px;
float: left;
clear:left;
width: 217px;
height:700px;
background-color:#f3fde8;
}
#contain #right{
position:relative;
top:20px;
float: right;
clear:right;
width: 1093px;
height: 700px;
right:18px;
background-color:#f9fef4;
/* background-image: url(../images/centertop.gif);*/
background-position:top;
background-repeat:no-repeat;
}
#fir{
background-image:url(../images/signout.gif);
background-position: center;
background-repeat:no-repeat;
left:20px;
width:217px;
height:32px;
line-height: 32px;
color: #FFFFFF;
font-style: inherit;
font-size:18px;
}
#showmenu{
position: relative;
height: 700px;
}
/* 对于显示列表的修饰 */
#showarticle{
font-family: "Trebuchet MS", sans-serif;
font-size: 16px;
font-weight: bold;
line-height: 1.4em;
font-style: normal;
border-collapse: separate;
}
#showmenu .shownodes thead th{
padding:15px;
color:#fff;
text-shadow:1px 1px 1px #568F23;
border:1px solid #93CE37;
bord-bottom:3px solid #9ED929;
background-color:#9DD929;
background: -webkit-gradient(
linear;
left-bottom,
left-top,
color-stop(0.02, rgb(123,192,67)),
color-stop(0.51, rgb(139,198,66)),
color-stop(0.87, rgb(158,217,41))
);
background: -moz-linear-gradient(
center bottom,
rgb(123,192,67) 2%,
rgb(139,198,66) 51%,
rgb(158,217,41) 87%
);
-webkit-border-top-left-radius:5px;
-webkit-border-top-right-radius:5px;
-moz-border-radius:5px 5px 0px 0px;
border-top-left-radius:5px;
border-top-right-radius:5px;
}
#showmenu .shownodes thead th:empty{
background:transparent;
border:none;
}
#showmenu .shownodes tbody th{
color:#fff;
text-shadow:1px 1px 1px #568F23;
background-color:#9DD929;
border:1px solid #93CE37;
border-right:3px solid #9ED929;
padding:0px 10px;
background:-webkit-gradient(
linear,
left bottom,
right top,
color-stop(0.02, rgb(158,217,41)),
color-stop(0.51, rgb(139,198,66)),
color-stop(0.87, rgb(123,192,67))
);
background: -moz-linear-gradient(
left bottom,
rgb(158,217,41) 2%,
rgb(139,198,66) 51%,
rgb(123,192,67) 87%
);
-moz-border-radius:5px 0px 0px 5px;
-webkit-border-top-left-radius:5px;
-webkit-border-bottom-left-radius:5px;
border-top-left-radius:5px;
border-bottom-left-radius:5px;
}
#showmenu .shownodes tbody td{
padding:10px;
text-align:center;
background-color:#DEF3CA;
border: 2px solid #E7EFE0;
-moz-border-radius:2px;
-webkit-border-radius:2px;
border-radius:2px;
color:#666;
text-shadow:1px 1px 1px #fff;
}
#contain #rowfooter {
position: relative;
color:#555;
font-size:18px;
height: 50px;
padding:20px 0 40px;
text-align: center;
float:none;
margin-bottom: auto;
clear: both;
}
回复讨论(解决方案)
#contain {
position: relative;
margin: 0 auto;
padding: 0px;
/*background-color:#FFFFFF;*/
width: 100%;
height: auto;
text-align: center;
display:table;
}
楼主试试
把#contain #left的width值改为17%; #contain #rightr的width值改为83%.
nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
#contain {
position: relative;
margin: 0 auto;
padding: 0px;
/*background-color:#FFFFFF;*/
width: 100%;
height: auto;
text-align: center;
display:table;
}
楼主试试
把#contain #left的width值改为17%; #contain #rightr的width值改为83%.
首先,谢谢帮我解答,按百分比可以,我试了一下,但是浏览器窗口一旦缩小了,图片部分缩小的很严重,估计是因为写了太多具体的宽度吧,协调性不太好,还是谢谢啊
nbsp;html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
非常感谢,你给的这个布局非常好,我会尝试用下你给的布局模板

熱AI工具

Undresser.AI Undress
人工智慧驅動的應用程序,用於創建逼真的裸體照片

AI Clothes Remover
用於從照片中去除衣服的線上人工智慧工具。

Undress AI Tool
免費脫衣圖片

Clothoff.io
AI脫衣器

Video Face Swap
使用我們完全免費的人工智慧換臉工具,輕鬆在任何影片中換臉!

熱門文章

熱工具

記事本++7.3.1
好用且免費的程式碼編輯器

SublimeText3漢化版
中文版,非常好用

禪工作室 13.0.1
強大的PHP整合開發環境

Dreamweaver CS6
視覺化網頁開發工具

SublimeText3 Mac版
神級程式碼編輯軟體(SublimeText3)

在 Dreamweaver 中將圖片置中:選擇要置中的圖片。在「屬性」面板中,設定「水平對齊」為「居中」。 (可選)設定“垂直對齊”為“居中”或“底部”。

什麼是全角字元?在電腦編碼系統中,全角字元是一種佔用兩個標準字元位置的字元編碼方式。相對應的,佔用一個標準字元位置的字元編碼方式稱為半角字元。全角字元通常用於中文、日文、韓文等亞洲文字的輸入、顯示和列印。在中文輸入法和文字編輯中,全角字符與半角字符的使用場景是有所區別的。全角字符的使用中文輸入法:在中文輸入法中,通常全角字符用於輸入中文字符,例如漢字、標

jQuery技巧:快速取得螢幕高度的實作方式在網頁開發中,經常會遇到需要取得螢幕高度的情況,例如實現響應式佈局、動態運算元素尺寸等。而使用jQuery可以很方便地實現獲取螢幕高度的功能。以下就來介紹一些使用jQuery快速取得螢幕高度的實作方式,並附上具體的程式碼範例。方法一:使用jQuery的height()方法取得畫面高度透過使用jQuery的height

flex版面的常用屬性有哪些,需要具體程式碼範例Flex佈局是一種用於設計響應式網頁版面的強大工具。它透過使用一組靈活的屬性,可以輕鬆控制網頁中元素的排列方式和尺寸。在本文中,我將介紹Flex佈局的常用屬性,並提供具體的程式碼範例。 display:設定元素的顯示方式為Flex。 .container{display:flex;}flex-directi

Bootstrap框架包含以下組成:CSS 預處理程式:SASS 和LESS響應式佈局系統:柵格系統和響應式實用程式類別元件:UI 元素和JavaScript 外掛程式主題和範本:預製樣式和預先建置頁面工具和實用程式:圖示集、jQuery、Grunt

清除浮動有什麼方法,需要具體程式碼範例在網頁佈局中,浮動是一種常用的佈局方法,可以讓元素脫離文件流,並相對其他元素進行定位。然而,使用浮動佈局時常常會遇到一個問題,就是父元素無法正確地包裹浮動元素,導致頁面產生佈局錯亂的情況。所以,我們需要採取措施來清除浮動,使得父元素能夠正確地包裹浮動元素。清除浮動的方法有多種,以下將介紹常用的幾種方法,並給出具體的程式碼範例

HTML的iframe標籤用法詳解HTML中的iframe標籤是用來在網頁中嵌入其他網頁或圖片等內容的方法。透過使用iframe標籤,我們可以在一個網頁中顯示另一個網頁的內容,以實現網頁佈局的靈活性和多樣性。在本文中,將詳細介紹iframe標籤的用法,並提供具體的程式碼範例。一、iframe標籤的基本語法結構在HTML中,使用iframe標籤需要以下基本語

如何使用CSSViewport單位vh來創建適配手機螢幕的網頁佈局手機設備的普及和使用越來越廣泛,越來越多的網頁需要進行手機螢幕的適配。為了解決這個問題,CSS3引入了一個新的單位-Viewport單位,其中包括vh(viewportheight)。在這篇文章中,我們將探討如何使用vh單位來建立適配手機螢幕的網頁佈局,並提供具體的程式碼範例。一
