圖片對齊以及塊元素(DIV, P, TABLE 等)的類 ,在WordPress 2.5: ttaligncenter/tt, ttalignleft/tt 和 ttalignright/tt。裏有介紹。此外,類 ttalignnone/tt 被添加到未排列的圖像,以便它們可以被安排不同的樣式。
同樣的類被應用到有標題的圖片(如WordPress 2.6)對齊圖片,3個附加的CSS類對於標題來講是必要的,這些對齊方式以及標題類是:
.aligncenter,
div.aligncenter {
display: block;
margin-left: auto;
margin-right: auto;
}
.alignleft {
float: left;
}
.alignright {
float: right;
}
.wp-caption {
border: 1px solid #ddd;
text-align: center;
background-color: #f3f3f3;
padding-top: 4px;
margin: 10px;
/* optional rounded corners for browsers that support it */
-moz-border-radius: 3px;
-khtml-border-radius: 3px;
-webkit-border-radius: 3px;
border-radius: 3px;
}
.wp-caption img {
margin: 0;
padding: 0;
border: 0 none;
}
.wp-caption p.wp-caption-text {
font-size: 11px;
line-height: 17px;
padding: 0 4px 5px;
margin: 0;
}
每個主題的ttstyle.css/tt都應當擁有或者有類似的樣式去規定合適地顯示圖片以及標題。
此外,有更多的WordPress類標籤,你可以選擇你想要的風格,因爲它們是默認產生的:
.categories {...}
.cat-item {...}
.current-cat {...}
.current-cat-parent {...}
.children {...}
.pagenav {...}
.page_item {...}
.current_page_item {...}
.current_page_parent {...}
.current_page_ancestor {...}
.widget {...}
.widget_text {...}
.blogroll {...}
.linkcat{...}