How to Make Random Headers


Ok, before we have learn the most easy way How to Make a blog, then i will share an advance tutorial How to change your header randomly. Well, first look at my another blog here, take a look on my header image then refresh or open a post.
How, did you get it ? If you understand how it works, then let's begin.
There are some info that you should know :
1. Not all blog template has header image (for example this blog).
2. Sometimes different template has different way to change your headers.
Pay attention on those things, but if you know the basic tag for html and css, that's easy to do.

How to Make Randomly Headers


1. Backup your blogger template, click on Template > Backup/Restore (top right) > Download full template. (safe way for unexpected things)
2. Open template html editor, click on Template > Edit HTML.
3. Identify your header tag. Just like what i said before, different template has different way. To do this, open your blog then use Inspect Element (right click anyewhere > Inspect Element, or press "F12" *chrome), you will see something like this.

Inspect Element Google Chrome

4. Click on magnifying glass (bottom left), then click on your header image. That my friend's blog (march 17th, 2015), pay attention at <div id="header">.
id="header" mean your header identifier, to change your header image and style you need open html editor and find .header (dot header) or #header
5. Back to your HTML editor, find string above, then delete it.

HTML Editor Blogger, #header

6. Next step, copy code below and paste under </b:skin> or <body blablabla>.

<script type='text/javascript'>
var iheader = [];
iheader[0]=&quot;http://1.bp.blogspot.com/-zz3rKHT_WJg/UnT642RwQrI/AAAAAAAABFE/rasygmR6BG8/s1600/header.jpg&quot;;
iheader[1]=&quot;http://1.bp.blogspot.com/-QlKdENW71f0/VI1I4gXCx9I/AAAAAAAACMo/qgb1Hk9IIIU/s1600/header-rikka.jpg&quot;;
iheader[2]=&quot;http://3.bp.blogspot.com/-t6CYZreuSEQ/VI1I3lQ4rQI/AAAAAAAACMk/cHFtbqOFkhY/s1600/header-tm.jpg&quot;;
iheader[3]=&quot;http://3.bp.blogspot.com/-DbxYtX7djcQ/VI1I5k2PQfI/AAAAAAAACMw/4v4QerUSU9k/s1600/header-yayoi.jpg&quot;;
var tdwgheader=Math.floor(Math.random() * 4);
document.write(&quot;<style>&quot;);
document.write(&quot;#header {&quot;);
document.write(&#39;background:#ddd url(&quot;&#39;+iheader[tdwgheader]+&#39;&quot;) no-repeat top center;&#39;);
document.write(&quot;width:980px;&quot;);
document.write(&quot;position: relative;&quot;);
document.write(&quot;margin: auto;&quot;);
document.write(&quot;height: 380px;&quot;);
document.write(&quot;line-height: 40px;&quot;);
document.write(&quot;overflow: hidden;&quot;);
document.write(&quot;box-shadow: -10px 0px 0px rgba(221, 221, 221, 0.4), 10px 0px 0px rgba(221, 221, 221, 0.4);&quot;);
document.write(&quot; }&quot;);
document.write(&quot;</style>&quot;);
</script>
Ok, i'll explain basic thing from those script.
Blue Text: your header image url. There i've 4 header image.
Purple Text: number of your header image. (related with blue text)
Orange Text: your header size, width and height.
If you know more about css, you can modify other element by your self.

Other example, if i have a blog with header image size 800px width and 200px height, and i want to use 3 header image then this is the script that you need to change.

<script type='text/javascript'>
var iheader = [];
iheader[0]=&quot;http://imageurl1.jpg&quot;;
iheader[1]=&quot;http://imageurl1.jpg&quot;;
iheader[2]=&quot;http://imageurl1.jpg&quot;;
var tdwgheader=Math.floor(Math.random() * 3);
document.write(&quot;<style>&quot;);
document.write(&quot;#header {&quot;);
document.write(&#39;background:#ddd url(&quot;&#39;+iheader[tdwgheader]+&#39;&quot;) no-repeat top center;&#39;);
document.write(&quot;width:800px;&quot;);
document.write(&quot;position: relative;&quot;);
document.write(&quot;margin: auto;&quot;);
document.write(&quot;height: 200px;&quot;);
document.write(&quot;line-height: 40px;&quot;);
document.write(&quot;overflow: hidden;&quot;);
document.write(&quot;box-shadow: -10px 0px 0px rgba(221, 221, 221, 0.4), 10px 0px 0px rgba(221, 221, 221, 0.4);&quot;);
document.write(&quot; }&quot;);
document.write(&quot;</style>&quot;);
</script>
7. Now click on Save template, then go to your blog and try to refresh overtime, if you see your header change that mean you're successful.

If you need help just leave a comment, i'll help you, see ya.

1 Response to " How to Make Random Headers "

  1. Wow that’s how we deliver the great prices you sees on our web page design.
    Free domain name

    ReplyDelete