CSS( Cascading Style Sheet ) can be used in number of ways with blog. You can easily improve the appearance of blog using CSS. Here we will discuss to create small triangle using CSS and apply it further to the blog template. We will add this triangle below the title of sidebar widget which looks so cool.
Make Blogger Blog To Look More Professional:
How To Create Triangle Using CSS:-
.arrow-up /* It Creates upward Triangle */
{
width: 0;
height: 0;
border-left: 5px solid transparent;
border-right: 5px solid transparent;
border-bottom: 5px solid black;
}
.arrow-down /* It Creates downward Triangle */
{
width: 0;
height: 0;
border-left: 20px solid transparent;
border-right: 20px solid transparent;
border-top: 20px solid #f00;
}
.arrow-right /* It Creates right pointed Triangle */
{
width: 0;
height: 0;
border-top: 60px solid transparent;
border-bottom: 60px solid transparent;
border-left: 60px solid green;
}
.arrow-left /* It Creates left pointed Triangle */
{ width: 0;
height: 0;
border-top: 10px solid transparent;
border-bottom: 10px solid transparent;
border-right:10px solid blue;
}
How To Use CSS Triangle In Blogger Template
Add CSS Triangle Below The Subscribe Widget
- Login to Blogger Dashboard.
- Go to Design / Edit HTML.
- Click "Expand Widget Templates".
- Download the Full template before making any changes in it (More Info).
- Copy the title of subscribe widget from the blog homepage. As in my case the title of subscribe widget is Subscribe via email.
- Find that word in blogger template.
<b:widget id='HTML2' locked='false' title='Subscribe via email' type='HTML'>
<b:includable id='main'>
<!-- only display title if it's non-empty -->
<b:if cond='data:title != ""'>
<h2 class='title'><data:title/></h2>
.
.
.
- Paste the following code just below the <h2 class='title'><data:title/></h2>.
<div style=' width: 0; height: 0; border-left: 10px solid transparent; border-right: 10px solid transparent; border-top: 10px solid #0084CE; position:relative;margin-left:auto;margin-right:auto; bottom:10px; '/>
Note:How To Modify The Code
- margin-left:auto or margin-left:auto specifies the middle alignment of the triangle.To move the position replace auto values with pixel values. margin-left:60px margin-right:auto it will take 60px from the left side.
- border-top: 10px solid #0084CE it will change the color of triangle.
More article from the same author

No comments:
Post a Comment