Twenty Twelve 佈景主題的設計是全寬度為 960pix,邊欄 (sidebar) 的寬度只有 250pix,對於置放廣告或其他用途是小了一點,邊欄與主要文章之間還有很大的空間來調整,可以利用修改 CCS 將邊欄寬度改為 300pix。
Twenty Twelve 佈景修改系列教學:
1. Twenty Twelve 佈景加入 Logo 圖標
2. Twenty Twelve 佈景調整邊攔寬度
Twenty Twelve 官方網站有寫出規格:
Quick Specs (all measurements in pixels)
- The main column width is 625 except in the full-width layout where it’s 960; sidebar width is 250.
- Featured image width is 624 (height is flexible)—these images are displayed on displayed on “standard” posts; posts without a specific format such as image, aside, link, or quote.
- The suggested header image dimensions are 960 by 250 (width, height). However, both are flexible so you can upload a smaller cropped image if you wish. The width is limited to 2000.
修改方法:
WP 控制台 >> 外觀 >> 自訂 >> 附加的 CSS
加入下面的 CCS 代碼:
.widget-area{ display:block; border-style:solid; background-image:none; margin-left:60px; margin-top:0px; } .widget-area .widget:not(.woocommerce){ margin-left:-50px; }
按發表,邊欄的寬度已修改成 300pix。