You know that endless amount of widget content in the sidebars of your blog? Ever wish you could having a scrolling windows to hold some of it, like those four dozen blog badges?
Here’s a simple HTML marquee code that does that:
<div align=”center”><marquee onmouseover=”this.stop()” direction=”up” width=”125px” onmouseout=”this.start()” scrollamount=”3″ loop=”true” height=”400px”>YOUR HTML HERE</marquee></div>
Well that doesn’t help alot huh? Don’t know what to do next? Thought you would never ask.
First of all, don’t try to copy that code above. It’s specially coded to APPEAR like HTML. Why? Because if it was REAL HTML code, then your browser would try to make that code happen. Down below, I give you a place to copy the real code.
Next, the important part of that code is “YOUR HTML HERE”. The rest of the code creates a “marquee container” that holds whatever HTML or content you put into it. I cannot cover all the possible ways this could be used. I’ll give you an example of putting in a list of Blog Badges. However, you can put any type of content into it, so just experiment. If you mess something up, or can’t get it to work, you can always remove it.
To begin, go to your Layout In Blogger (I’ll describe this for Blogger, but you can use similar tools in WordPress or other blog platforms). In a sidebar, choose “Add a Gadget”. Then choose “HTML/Javascript”. Paste in the Marquee Code (provided at the end of this blog post).
Now you are ready to start adding your own content. Replace on the spot that says “YOUR HTML HERE”. So, if I wanted to add four blog badges, I would paste this HTML code and replace “YOUR HTML HERE”:
<a href=”http://adoptbellagrace.blogspot.com/” target=”_blank”><img border=”0″ alt=”" src=”http://www.brentriggs.com/blogbadges/loveshack.jpg”/></a>
<a href=”http://ferrickfamilypromise.blogspot.com/” target=”_blank”>
<img border=”0″ src=”http://www.brentriggs.com/blogbadges/bella.jpg”/> </a>
<a href=”http://4littlemen.blogspot.com” target=”_blank”><img border=”0″ alt=”" src=”http://www.brentriggs.com/blogbadges/britt.jpg”/></a>
<a href=”http://www.kellyskornerblog.com/ ” target=”_blank”><img border=”0″ src=”http://www.brentriggs.com/blogbadges/harper.jpg”/></a>
I colored each instance of badge code alternating colors so you can see all that it is just the same thing over and over with different link/image addresses. The changing attribute of the HTML image tag (“img”) is “src” (where is image you want to show?). The “img” tag is then surrounded by an “a” tag which is how you link the image to an address (the “href” attribute).
- So you have this basic HTML to create a linked image: <a><img /></a>
- The “img” tag gets the image to show, and the “a” tag links the image.
- The attributes inside each tag control the tag (ie, “src”, “href”)
Putting that code into the Marquee code (replacing “YOUR HTML HERE”) produces the scrolling badges you see up at the top of this post.
Confused? Don’t be. Once you get the hang of a little HTML, its pretty easy. Below is the code for the marquee, and then a 2nd sample where I’ve put in two blog badges. You can replace the links to the images and blogs, and easily change the to your own. If you want to add more badges, just duplicate one instance of the blog badge code as many times as you need.
Remember, you can put just about anything in the scrolling window as long as it looks good and fits in your sidebar. You can even use the scrolling marquee in a blog post like I’ve done here. You can change the width to fit whatever you want (change it to width=100% to fit whatever space you put it in).
Check out a real live use of this on a regular ole’ blog to prove its not just for technogeeks like me: http://adoptbellagrace.blogspot.com/ (lefthand column, down the page a little)
Here’s the marquee code:
Here’s the marquee code with two blog badges example:
UPDATE:
I was asked if this can go horizontal. Yep! Up, down, left or right. Here’s a sample of horizontal code:
And it looks like this:
![]() |
I would be very grateful if you |






{ 10 comments… read them below or add one }
Brent
This is really neat. I am about to build a church website and update a charitable org site this is so great for both. I haven’t tested it yet and will let you know the outcome by reposting.
Thanks for sharing
Hi great work !! I have a ? can this work on a wordpress widget? and how to do it !
Brent,
I have tried and tried to get these marquees to work and am having no luck. Are these html codes still accurate. Any help would be great. Thanks!
Brent, can you help me out? i’m trying to get this to work. but if you look on my blog, ALL the badges are listed in one big line and scrolling right to left. I can’t seem to get them to scroll one after the other. can you tell me what i’m doing wrong?? please email me.
thanks
I sent Julia a fix… there were some double quotes around some parameters of her code causing the problem.
Brent,
Thank you for your help with the marquee code. I have been able to get them marquees up on my blog.
Barbara
http://barbarasbeat.blogspot.com/
You are VERY welcome….
Brent… I have been able to get 2 scrolling marquees up
)
But now I have run across a problem… I was hoping to get an scrolling marquee up that would contain blog awards. I did the same thing as the marquees for the blogs buttons. but the images of the blog awards will not show…only a little question mark in a little box shows up?
…am I missing some part of the html? As always- I greatly appreciate your time and that you have always been able to answer my questions
)
Blessings & Aloha!
PLEASE HELP. I’ve written to you several times, both thanking you for this pot and asking if you can help me more since I can’t get it to work. I don’t get what I’ve done wrong. Hre is what I have for the marquee code.
Thanks, Barbara
Barbara,
I’ve not seen any message about this… not sure what is happening. How can I help? If you need help with code, either email the code to me, or send me a link to a page on line where you have it.