How To Make The Blogger Date Header Stylish
Steps To Make Blogger Blog Date Header Stylish
Step 1: From your Blogger dashboard, go to Theme, then click the arrow next to Customize and choose Edit HTML.
Step 2: Click anywhere inside the template code and press Ctrl + F keys to open the search box.
Step 3: Now search for the code given below:
.date-header span
Note:- Date Header code varies from template to template. If you use custom blogger template, it might vary.
Step 4: When you will find the code then you will see other codes like given below:
.date-header span {
background-color: $(date.header.background.color);
color: $(date.header.color);
padding: $(date.header.padding);
letter-spacing: $(date.header.letterspacing);
margin: $(date.header.margin);
}
Step 5: Now replace the above code with the code given below:
/* Date header as a round badge next to the post */
.date-header {
position: relative;
margin: 0 0 10px 0;
}
.date-header span {
background-color: #DDEDAA;
color: #444;
padding: 16px;
border-radius: 50%;
border: 3px solid #bada55;
display: inline-block;
}
.date-header:before {
background: #FCFCFC;
border: 10px solid #FFBD54;
border-radius: 50%;
content: "";
display: block;
height: 30px;
width: 30px;
position: absolute;
left: -45px;
top: -10px;
z-index: 10;
}
.date-header:after {
background: #F9F9F9;
border: 7px solid #bada55;
border-radius: 50%;
content: "";
display: block;
height: 15px;
width: 15px;
position: absolute;
left: -25px;
bottom: -5px;
z-index: 10;
}
/* On phones and narrow screens, keep the badge inside the post so nothing is cut off */
@media screen and (max-width: 768px) {
.date-header {
margin: 0 0 10px 0;
}
.date-header:before,
.date-header:after {
display: none;
}
.date-header span {
padding: 10px;
}
}
I have removed the -190px left margin from the old code. It pushed the date header off the screen on phones, and the old code had no mobile rule at all. The new code keeps the round badge and the two small circles on desktop, and the media query at the end hides the circles and shrinks the badge on screens narrower than 768px, so nothing is cut off.
Step 6: Click Save at the top of the theme editor and open your blog to check the new date header.
How To Customize The Date Header Colors
Change the #DDEDAA with your own hex color code if you want to customize background color of the date header
Change the #444 if you want to customize the color of the fonts
Change the #FFBD54 if you want to change the border color of the circle
Change the #bada55 if you want to customize the border color green circle
Change the -45px and -25px values in the code if you want to move the two small circles further left or right. On phones the circles are hidden, so only change them for desktop.
Wrapping Up
Now you have applied a new style to make the date header of the blogger blog stylish. And I hope you liked the post. If there is a problem don't forget to comment down and Happy Blogging:-)



Comments
Post a Comment