[英]How to space between content and sidebar widget in blogger?
我想在主要內容和側邊欄之間添加一些空間,在黑色空間中,必須顯示背景圖像,我不想添加邊框。
看到我的博客模板截圖。 圖片鏈接: -http : //i.stack.imgur.com/xxpfV.jpg
因此,主要內容與側邊欄之間沒有任何空格。
看到另一個屏幕截圖,在這張照片中,您將在主要內容和側邊欄之間看到一些空間。 圖片鏈接-http: //i.stack.imgur.com/Y5bld.jpg
所以我想像這樣增加空間,有人知道如何用邊距和填充嗎?
我正在使用簡單的白色博客模板,因此我需要在哪個類或ID中添加CSS代碼?
非常感謝您提供的任何幫助。
HTML代碼:
<div id="wrapper">
<div id="left">
<p>The left-hand content</p>
</div>
<div id="right">
<p>The right-hand content</p>
</div>
</div>
這是css:
#wrapper
{position: fixed;
top: 0;
bottom: 0;
right: 0;
left: 0;
display: block;
width: 100%;
background-color: #ffa;
}
#right {position: absolute;
border-radius: 5px 10px / 10px;
top:5%;
right: 10%;
bottom: 0;
width: 17%;
display: block;
background-color: #ccc;
overflow: auto;
}
#left {width: 60%; height:100%;
border-radius: 5px 10px / 10px;
margin-top:2.5%;
margin-left: 10%;
margin-right: 16%;
display: block;
background-color: #0ff;
overflow: auto;
}
p {display: block;
margin: 0.5em;
padding: 0.2em 0.5em;
}
上面的代碼如下圖所示: http://i57.tinypic.com/29wv614.png
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.