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;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhwDNGW5r2PLVIJzao58Yo1KHZCjgELTo02ltE6nqEzZipVsp57-ESNmcbbHImc7kBAMnJ193jC6Ua22zBpNrpAhB0anZKiWsXmwYXHlPsqsHCwRB3aE7ChBp2BRU0gqplaVIWFveq-9jZ6/s1600/header.jpg&quot;;
iheader[1]=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjK-ItRWhk2DsrvJis839VsZB9FVKiLkEdZJ4Zo9lKZgaamrbqBixhemlT8TcElEDiTL_3zgGcscuOBidHtEIj8yT7owBzIXK00Gxh3-xrWSt8i45Z1Yo5NnXClrHD9GY_z8ZNlTmTIvQm7/s1600/header-rikka.jpg&quot;;
iheader[2]=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdP5JZVwbY4N9IHkvLJ_IHKw_KAf7Ndut66xWyTmohli9tuka0F9aMHkIhJVw8I3RHYv2WYcX-z1GKXGT1-MRyidsBPWpSjIvqU91v-_5fGOjnq7VHRuLMJDH7ZA4O0Eu_gcePLYBcKUFZ/s1600/header-tm.jpg&quot;;
iheader[3]=&quot;https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgljlBnHtIw6smewCAFl0uLoKpufaMI9RcbTcuuWTT8h7vdwgq0n3osP6KEFGHSFZ4H-aUyV4OVlkGkcENV2WrYbCf8cUKKglVF719Q0FBeH2C-2QbmukRv6ygawypsnXZT7k9kBNsKLLrA/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