We saw
How to define a CSS in general HTML?.In blogger,
Places where CSS and HTML used together?
- In posts.
- In HTML/Java Script Gadgets.
- In Overall Template.
In Posts :-
- The CSS is defined in the HTML part of the post at the top. For example,
<style type="text/css">
.textborder{border:0.5px solid black;}
</style>
- The above code should be pasted at the top of the post. Therefore the post will look like,
<style type="text/css">
.textborder{border:0.5px solid black;}
</style>
<div>
<div class="textborder">
body of the post</div>
</div>
- The life span of the style is the life span of the post.
In HTML/ Java Script Gadgets:-
- Same way as first step, but the you needa place the style in a HTML gadget.
- HTML/Java Script Gadget? :-
- Dashboard => Design => Page Elements(if necessary) => Add a gadget => HTML/Java Script [Old UI]
- Dashboard => Layouts => Add a gadget => HTML/Java Script [New UI]
- Place the code as below in the gadget.
<style type="text/css">
.textborder{border:0.5px solid black;}
</style>
<div>
<div class="textborder">
body of the HTML Gadget</div>
</div>
- The Life span of the style is the life span of the HTML/Java Script Gadget.
In Overall Template:-
Two ways again
:-
- Go to Add CSS option:-
- Dashboard => Design => Template Designer => Advanced => Add CSS [Old UI]
- Dashboard => Template => Customize => Advanced => Add CSS[New UI]
Just Paste the code without <style/> tag. Like below
.textborder{border:0.5px solid black;}
Click Apply to Blog.
- Go to HTML Template Editor. Press Ctrl + F. Find the following code.
]]></b:skin>
Paste the CSS that you pasted in previous step just above the found code. Save Template.
How to use the css?