Bloggers' Paradise Forum Index Bloggers' Paradise
The forum for personal bloggers to get help and share knowledge on all aspects of blogging.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   Join! (free) Join! (free)
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Announcements
Bloggers' Paradise Closing Down
July's Theme is Independence
June's Theme is Favourite Recipe
May's Theme is Childhood Sweets
April's theme is Three Wishes
Blog-a-long for March - My Best Holiday Ever!
Congratulations to Ruthjen!
PLEASE UPDATE ANY LINKS YOU HAVE TO THE OLD FORUM!
The idea of the Blogalong
Sticky Articles
The Button
Important Links
Blog-a-long
Welcome Pack
Latest Posts
Sweet HTML Morsels Progress Bars
Adding images to blogger
Bloggers' Paradise Closing Down
adding a new item to sidebar
got a bit of a problem...
Hi from Cinders
Displaying a button link
July's Theme is Independence
June's Theme is Favourite Recipe
can't find the right bit in my template...

Updated Progress Bars

 
Post new topic   Reply to topic    Bloggers' Paradise Forum Index -> Blogger Switch Woes
View previous topic :: View next topic  
Author Message
jacquie
Site Admin


Joined: 31 Jan 2007
Posts: 102


Location: Salt Lake City, Utah, USA

PostPosted: Sun Feb 04, 2007 12:08 am    Post subject: Updated Progress Bars Reply with quote

If you use Matthew Harvey's Sweet HTML Morsels Progress Bars they will not work on the new Blogger because it is not strict XHTML which is fussier about correct tag formation than regular old HTML.

This is updated code that will work - add it as a sidebar page element.

Code:

<script language="javascript">
  // drawPercentBar()
  // Written by Matthew Harvey (matt AT unlikelywords DOT com)
  // (http://www.unlikelywords.com/html-morsels/)
  // Distributed under the Creative Commons
  // "Attribution-NonCommercial-ShareAlike 2.0" License
  // (http://creativecommons.org/licenses/by-nc-sa/2.0/)
  function drawPercentBar(width, percent, color, background)
  {
    var pixels = width * (percent / 100);
    if (!background) { background = "none"; }
 
    document.write('<div style="position: relative; line-height: 1em; background-color: '
                   + background + '; border: 1px solid black; width: '
                   + width + 'px">');
    document.write('<div style="height: 1.5em; width: ' + pixels + 'px; background-color: '
                   + color + ';"></div>');
    document.write('<div style="position: absolute; text-align: center; padding-top: .25em; width: '
                   + width + 'px; top: 0; left: 0">' + percent + '%</div>');
    document.write('</div>');
  }
</script>




_________________
Jacquie

Jacquie's Journal
Crafty Threads 'n' Yarns
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    Bloggers' Paradise Forum Index -> Blogger Switch Woes All times are GMT
Page 1 of 1
  

Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

Card File  Gallery  Forum Archive
Powered by phpBB © 2001, 2005 phpBB Group
Create your own free forum | Buy a domain to use with your forum
Debt Consolidation|Myspace Friend Train|Kamala|Dell Deals|Debt Consolidation