[SOLVED] Marquee in CSS

This is a discussion on "[SOLVED] Marquee in CSS" within the Web Page Design section. This forum, and the thread "[SOLVED] Marquee in CSS are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Oct 17th, 2007, 04:43
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 19
Posts: 232
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
[SOLVED] Marquee in CSS

Is there a way i can do a marquee in css?
Last Blog Entry: My blog? (Oct 18th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Oct 17th, 2007, 07:02
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,795
Thanks: 0
Thanked 17 Times in 17 Posts
Re: Marquee in CSS

No, you cannot create a marquee using completely CSS, you need JavaScript... There is however a marquee tag in html although it is depreciated and therefore will give you invalid code.

Oh, by the way, what way do you want it to scroll? Verticle or Horazontal?
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Oct 17th, 2007, 13:41
Highly Reputable Member
Join Date: Jul 2006
Location: Devon, England
Posts: 565
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Marquee in CSS

If you want a scroller, make sure you use one which is cross browser compatiable (did i spell that right?).

www.dynamicdrive.com has some scrollers
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Oct 18th, 2007, 01:04
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 19
Posts: 232
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Marquee in CSS

hm,mm Css needs to get in teh ball then haha.. or microsoft.. haha..

and it would b e horizontal.
Last Blog Entry: My blog? (Oct 18th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Oct 18th, 2007, 05:32
Highly Reputable Member
Join Date: Apr 2007
Location: Willich, Germany
Age: 20
Posts: 593
Blog Entries: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Marquee in CSS

Quote:
Originally Posted by mcdanielnc89 View Post
hm,mm Css needs to get in teh ball then haha.. or microsoft..
NOT! HTML is a markup language --> static. This is what javascript is for....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Oct 18th, 2007, 09:16
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,795
Thanks: 0
Thanked 17 Times in 17 Posts
Re: Marquee in CSS

Quote:
Originally Posted by mcdanielnc89 View Post
hm,mm Css needs to get in teh ball then haha.. or microsoft.. haha..

and it would b e horizontal.
What
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Oct 30th, 2007, 07:57
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Marquee in CSS

I found this:
Code: Select all
<marquee bgcolor="#cccccc" border="0"  align="middle" scrollamount="3" scrolldelay="60" behavior="scroll"  width="200" height="12" style="font-family: Verdana, Arial, Helvetica,  sans-serif; color: #CC0000; font-size: 10">Wow...Isn't 
this one much  better?</marquee>
and this:
Code: Select all
<marquee bgcolor="#cccccc" border="0" align="middle" scrollamount="3"  scrolldelay="60" behavior="scroll" width="200"  height="12" style="font-family: Verdana, Arial, Helvetica, sans-serif; color:  #CC0000; font-size: 10">Wow...Isn't 
this one much better than the one  above?</marquee>
some of them will only work in IE..
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Oct 30th, 2007, 08:04
Most Reputable Member
Join Date: May 2007
Location: UK
Age: 27
Posts: 1,111
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Marquee in CSS

Quote:
Originally Posted by mcdanielnc89 View Post
hm,mm Css needs to get in teh ball then haha.. or microsoft.. haha..

and it would b e horizontal.
He's speaking in tongues.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Oct 30th, 2007, 08:49
Highly Reputable Member
Join Date: Jul 2006
Location: Devon, England
Posts: 565
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Marquee in CSS

Quote:
Originally Posted by monie View Post
I found this:
Code: Select all
<marquee bgcolor="#cccccc" border="0"  align="middle" scrollamount="3" scrolldelay="60" behavior="scroll"  width="200" height="12" style="font-family: Verdana, Arial, Helvetica,  sans-serif; color: #CC0000; font-size: 10">Wow...Isn't 
this one much  better?</marquee>
and this:
Code: Select all
<marquee bgcolor="#cccccc" border="0" align="middle" scrollamount="3"  scrolldelay="60" behavior="scroll" width="200"  height="12" style="font-family: Verdana, Arial, Helvetica, sans-serif; color:  #CC0000; font-size: 10">Wow...Isn't 
this one much better than the one  above?</marquee>
some of them will only work in IE..
Isn't that depricated code?

Personally, I think scrolling marquees like that are pretty outdated. I would prefer a vertical scroller which could display snippets of new articles or something
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Oct 30th, 2007, 11:07
alexgeek's Avatar
Moderator

SuperMember
Join Date: Jul 2007
Location: Webforumz 24/7
Age: 15
Posts: 3,812
Blog Entries: 9
Thanks: 2
Thanked 2 Times in 2 Posts
Re: Marquee in CSS

This works in FF, I just tried it.
HTML: Select all
<marquee style="background-color: #000; color: #FFF;">scroller</marquee>
I think you'd be better using JS for this though.
Last Blog Entry: 3D Chess in your browser! (Mar 14th, 2008)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Oct 30th, 2007, 12:24
Highly Reputable Member
Join Date: Jul 2006
Location: Devon, England
Posts: 565
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Marquee in CSS

Quote:
Originally Posted by alexgeek View Post
This works in FF, I just tried it.
HTML: Select all
<marquee style="background-color: #000; color: #FFF;">scroller</marquee>
I think you'd be better using JS for this though.
But does it validate?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #12  
Old Oct 30th, 2007, 16:38
Marc's Avatar
Staff Manager

SuperMember
Join Date: Apr 2007
Location: Scotland, UK
Posts: 1,795
Thanks: 0
Thanked 17 Times in 17 Posts
Re: Marquee in CSS

Nope - it shouldn't.
__________________
Marc
Staff Manager - Webforumz.com


Want to be a moderator? PM me.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #13  
Old Oct 31st, 2007, 02:31
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Marquee in CSS

Ahh... I shouldn't post them! It's an old antique style..
and mcdanielnc89, you should listen to these guys..
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #14  
Old Oct 31st, 2007, 04:43
mcdanielnc89's Avatar
SuperMember

SuperMember
Join Date: Sep 2007
Location: Missouri
Age: 19
Posts: 232
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Marquee in CSS

i plan on it, hehe
Last Blog Entry: My blog? (Oct 18th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #15  
Old Oct 31st, 2007, 04:48
Most Reputable Member
Join Date: Feb 2004
Location: Borneo
Age: 27
Posts: 1,612
Blog Entries: 2
Thanks: 0
Thanked 4 Times in 3 Posts
Re: Marquee in CSS

Quote:
Originally Posted by AdRock View Post
But does it validate?
Check if it validate..?
Last Blog Entry: ASP Programming Tips and Technique (Oct 26th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #16  
Old Oct 31st, 2007, 12:13
Elite Veteran
Join Date: Jan 2007
Location: You know where
Age: 31
Posts: 4,617
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Marquee in CSS

Code with the <marquee> tags won't validate as it's not a defined element from the W3C

HTML: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-US">

<head>
    <title>Some title</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    
</head>

<body>

<marquee bgcolor="#cccccc" border="0" align="middle" scrollamount="3"  scrolldelay="60" behavior="scroll" width="200"  height="12" style="font-family: Verdana, Arial, Helvetica, sans-serif; color:  #CC0000; font-size: 10">Wow...Isn't this one much better than the one  above?</marquee>

</body>
</html>
15 simple lines of code that outputs 11 validation errors
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #17  
Old Oct 31st, 2007, 12:36
Highly Reputable Member
Join Date: Jul 2006
Location: Devon, England
Posts: 565
Thanks: 0
Thanked 0 Times in 0 Posts
Re: Marquee in CSS

Quote:
Originally Posted by karinne View Post
Code with the <marquee> tags won't validate as it's not a defined element from the W3C

HTML: Select all
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
   "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en-US">
 
<head>
    <title>Some title</title>
    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
 
</head>
 
<body>
 
<marquee bgcolor="#cccccc" border="0" align="middle" scrollamount="3"  scrolldelay="60" behavior="scroll" width="200"  height="12" style="font-family: Verdana, Arial, Helvetica, sans-serif; color:  #CC0000; font-size: 10">Wow...Isn't this one much better than the one  above?</marquee>
 
</body>
</html>
15 simple lines of code that outputs 11 validation errors
My point exactly
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #18  
Old Nov 1st, 2007, 00:43