2013-10-01 40 views
0

我正在試驗一個位置:fixed; #寬度爲100%,最大高度爲50px的頁眉。在大多數網頁瀏覽器的全屏幕中,我無法保證#header中佈局的內容是一致的,但是,它很可能適合頁面。然而,更大的關注點在於調整其內容將會看起來完全混亂。有沒有人有一種他們喜歡的方法來擴展這個內容?職位:固定; Web瀏覽器的縮放方法

下面是我在做

/* --- Footer/Header Area --- */ 
#footer { 
height: 70px; 
max-height: 70px; 
width: 100%; 
position: absolute; 
background-color: #eee 

} 

#header { 

background-color: #fff; 
height: 50px; 
max-height: 50px; 
line-height: 45px; 
width: 100%; 
position: fixed; 
top: 0; 
float:left; 
box-shadow: 2px 4px 5px #555; 

} 



#header img { 

/* --- TOGOHERE: >>>> margin: 10px 30px 0 --- */ 

} 

#header h1 { 
display:inline-block; 
font-size: 1.2em; 
font-family:Courier New; 
text-align: left; 

} 

#header h2 { 
display:inline-block; 
font-size: x-small; 
font-family: Tahoma; 
text-align: center; 
padding-right:2cm; 
} 

#header h3 { 
display:inline-block; 
font-size: xx-small; 
font-family: Tahoma; 
text-align: center; 
padding-right:2cm; 
} 

回答

0

你能不能爲每個媒體查詢中使用替代容器體積小巧基本樣本。一個用於大屏幕,一個用於中型,一個用於小型,一個用於小型。

+0

這是一個格式化選擇器,或者我將其作爲屬性應用於div?我的問題有意義嗎? – mhcc66

+0

給一個div說一個類的容器,然後使用媒體查詢來改變基於屏幕寬度的容器的大小 –

+0

對不起,意味着每個大小不同大小的容器查找twitter bootstrap 3,你可以看到他們是如何做到這一點。或者只是使用該框架觀看一些視頻其非常有用的TB3 –