Hey guys now we know how to change background color with html elements.
The following examples use is CSS(Cascading style sheet).CSS is the best way for setting background.It's better than all other outdated methods.
You have only add this in your blogger by following ways :
<div style="background-color:yellow;border:1px solid black;padding:10px;">
<p>HTML background code is limited, CSS background code is much better!</p>
</div>
example:
The following examples use is CSS(Cascading style sheet).CSS is the best way for setting background.It's better than all other outdated methods.
You have only add this in your blogger by following ways :
- Blogger>Layout
- Html/Javascript
- and paste the following codes inside which is given below.
<div style="background-color:yellow;border:1px solid black;padding:10px;">
<p>HTML background code is limited, CSS background code is much better!</p>
</div>
example:
Background image:
<div style="background-image:url(/pix/smile.gif);
background-repeat:repeat;
width:200px;
height:200px;">
<p>HTML background code is limited, CSS background code is much better!</p>
</div>
Fixed Background Image:
<div style="background-image:url(/pix/smile.gif);
background-repeat:repeat;
background-attachment:fixed;
overflow:scroll;
width:200px;
height:100px;">
<p>HTML background code is limited, CSS background code is much better!
example shows how a background image can be set to a fixed position
- even though its containing block scrolls.</p>
</div>
Shorthand Background code:
<div style="background:url(/pix/smile.gif) repeat fixed;
overflow:scroll;
width:200px;
height:100px;">
<p>HTML background code is limited, CSS background code is much better!
example shows how a background image can be set to a fixed position
- even though its containing block scrolls.</p>
</div>
0 comments:
Post a Comment