Đây là một thủ thuật rất hay giúp bạn thay đổi phong cách widget title cho Wordpress, sẽ rất dễ dàng nếu bạn am hiểu về CSS. Nếu không, cũng đừng quá lo lắng.
Thêm đoạn code sau vào style.css
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
.sidebar .widget-title:before {
border-bottom: 15px solid #005D87;
border-left: 20px solid rgba(0, 0, 0, 0);
content: "";
display: block;
height: 0;
left: 0;
position: absolute;
top: -15px;
width: 0;
z-index: 0;
}
.sidebar .widget-title:after {
border-bottom: 15px solid #005D87;
border-right: 20px solid rgba(0, 0, 0, 0);
content: "";
display: block;
height: 0;
position: absolute;
right: 0;
top: -15px;
width: 0;
z-index: 0;
}
.sidebar .widget-title {
background: none repeat scroll 0 0 #0074A2;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
color: #FFFFFF;
display: inline-block;
font-size: 1.25em;
line-height: 2.5em;
margin: 0 0 0 -3.05em;
min-height: 50px;
position: relative;
width: 400px;
z-index: 10;
margin-top: -25px;
font-weight: bold;
text-align: center;
}
|
Như vậy, các bạn có thể thay đổi màu, độ rộng, font chữ widget title sao cho phù hợp với blog của bạn nhất.Chúc các bạn thành công !
Sign up here with your email