marquee basics

Back to the index.

How to create a basic marquee.

A marquee exists when the content of a box is larger than the box, and you give it explicit orders to scroll by using overflow: marquee (properly prefixed).

In these examples the box has white-space: nowrap so that the lines of text are too long for the box. Then we create a marquee with overflow: marquee. I also added an overflow: hidden for the browsers that don’t support marquee, and because it’s necessary for some tests of the unsupported bits of the standard.

div.test {
	overflow: hidden;
	border: 5px double;
	white-space: nowrap;
	margin: 20px 0;
	padding: 5px;
	overflow: [-prefix-]marquee;
}

Prefixes

none

The marquee properties allow us to create an auto-scrolling marquee that continues scrolling forever.
Whether this is a good idea probably depends on your taste, but some people like it quite a bit.

-webkit-

The marquee properties allow us to create an auto-scrolling marquee that continues scrolling forever.
Whether this is a good idea probably depends on your taste, but some people like it quite a bit.

-moz-

The marquee properties allow us to create an auto-scrolling marquee that continues scrolling forever.
Whether this is a good idea probably depends on your taste, but some people like it quite a bit.

-ms-

The marquee properties allow us to create an auto-scrolling marquee that continues scrolling forever.
Whether this is a good idea probably depends on your taste, but some people like it quite a bit.

-o-

The marquee properties allow us to create an auto-scrolling marquee that continues scrolling forever.
Whether this is a good idea probably depends on your taste, but some people like it quite a bit.

overflow-style

The marquee properties allow us to create an auto-scrolling marquee that continues scrolling forever.
Whether this is a good idea probably depends on your taste, but some people like it quite a bit.