We saw How to define a CSS in general HTML?.In blogger,
Places where CSS and HTML used together?
Two ways again :-
Places where CSS and HTML used together?
- In posts.
- In HTML/Java Script Gadgets.
- In Overall Template.
- 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.
- 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.
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]
.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.
- When you place the CSS in a template, you can use it anywhere inside the Blog. You should just enclose with <div/> tag.
- Like this:-
<div class="textborder">Body of the HTML gadget/Post/Template</div> - The life span of the style is the life span of the blog.
No comments :
Post a Comment