Jerry D
Jerry D

Reputation: 391

Making a <marquee> be screen width

I’m trying to set up a for the top of my site to put something on now and then. However, it doesn’t reach to the ends of my screen which looks odd.marquee image

HTML

<body>
    <marquee>Super Bowl Sunday!</marquee>`

CSS

marquee {
  background-color: #4CAF50;
}

How can I extend this? I tried using align, width, and margin but it doesn’t make it cover the screen and stay centered. Any help would be great. Is this maybe because it’s considered ‘obsolete’? Thanks!

Upvotes: 0

Views: 1166

Answers (1)

ellipsis
ellipsis

Reputation: 12152

Body Padding and Margin should be 0

marquee {
  background-color: #4CAF50;
}
body
{
padding:0;
margin:0;
}
<body>
    <marquee>Super Bowl Sunday!</marquee>
    </body

Upvotes: 1

Related Questions