Web Analytics Made Easy -
StatCounter HTML Marquee changing to paragraph - CodingForum

Announcement

Collapse
No announcement yet.

HTML Marquee changing to paragraph

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • HTML Marquee changing to paragraph

    Alright so this is my HTML file:

    Code:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>[email protected] Portaal Pagina</title>
    <link href="Styles.css" type="text/css" rel="stylesheet" />
    </head>
    
    <body bgcolor="#999999" leftmargin="20" topmargin="10">
    <div id="nav">
    <div id="nav_wrapper">
    <ul>
    <li><a href="Start.htm">Start</a></li>
    <li><a>VWO 4</a>
    <ul>
    <li><a>Test1</a></li>
    <li><a>Test2</a></li>
    </ul>
    </li>
    <li><a>VWO 5</a>
    <ul>
    <li><a href="http://2college.omo-elo.nl/CMS/PROJECTS/705/test-project%20Bram%20vd%20Bruggen%204v/Werkruimte/Overig/V4%20Test%201/index.htm">Test1</a></li>
    <li><a>Test2</a></li>
    </ul>
    </li>
    <li><a>VWO 6</a>
    <ul>
    <li><a>Test1</a></li>
    <li><a>Test2</a></li>
    </ul>
    </li>
    </ul>
    </div>
    </div>
    [B]<p><span style="color: orange; font-family: Arial; font-size: large;"><strong> TEST </strong></span></p>[/B]
    </body>
    </html>
    The bold part should be a marquee but keeps changing to a paragraph. (for no reason I think)

    This is the marquee itself:
    Code:
    <marquee behavior="scroll" direction="left"><font size="4" face="Arial" color="orange"><b> TEST </b></font></marquee>
    Also involved is this CSS file:
    Code:
    body {
        padding: 0;
        margin: 0;
        font-family: Arial;
        font-size: 17px;
    }
    #nav {
        background-color: #222;
    }
    #nav_wrapper {
        width: 960px;
        margin: 0 auto;
        text-align: left;
    }
    #nav ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
        position: relative;
        min-width: 200px;
    }
    #nav ul li {
        display: inline-block;
    }
    #nav ul li:hover {
        background-color: #333;
    }
    #nav ul li a, visited {
        color: #CCC;
        display: block;
        padding: 15px;
        text-decoration: none;
    }
    #nav ul li:hover ul {
        display: block;
    }
    #nav ul ul {
        display: none;
        position: absolute;
        background-color: #333;
        border: 5px solid #222;
        border-top: 0;
        margin-left: -5px;
    }
    #nav ul ul li {
        display: block;
    }
    #nav ul ul li a:hover {
        color: #699;
    }
    Please tell me how it happens that this keeps changing or if it is a bug, I'm getting a bit frustrated.

    Kind Regards

  • #2
    I fixed the Marque. Your code is a mess. I started to put it in the proper HTML5 format and after about 15 minutes gave up. Most of your links are not added correctly, they are not properly nested and structured.


    The Marque is working and if you would like some pointers on how to properly structure HTML look at a few of my FREE videos, on my site. Also, never use Uppercase in file names on a web server. Depending upon the age of the server and the software running on it that can cause you problems. It is a Best Practice to avoid spaces, always use lowercase, keep the names reasonably short for all filenames.

    The Marque is now working...

    HTML File

    Code:
    <!DOCTYPE html>
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>[email protected] Portaal Pagina</title>
    <link href="styles.css" type="text/css" rel="stylesheet" />
    </head>
    <body bgcolor="#999999" leftmargin="20" topmargin="10">
    <nav id="nav">
    	<div id="nav_wrapper">
    		<ul>
    			<li><a href="Start.htm">Start</a></li>
    			<li><a>VWO 4</a>
    				<ul>
    					<li><a>Test1</a></li>
    					<li><a>Test2</a></li>
    				</ul>
    			</li>
    			<li><a>VWO 5</a></li>
    		<ul>
    			<li><a href="http://2college.omo-elo.nl/CMS/PROJECTS/705/test-project%20Bram%20vd%20Bruggen%204v/Werkruimte/Overig/V4%20Test%201/index.htm">Test1</a></li>
    			<li><a>Test2</a></li>
    		</ul>
    <li><a>VWO 6</a>
    <ul>
    <li><a>Test1</a></li>
    <li><a>Test2</a></li>
    </ul>
    </li>
    </ul>
    </div>
    </nav>
    <marquee behavior="scroll" direction="left"><font size="4" face="Arial" color="orange"><b> This is the Marque Test </b></font></marquee>
    </body>
    </html>
    CSS File

    Code:
    body {
        padding: 0;
        margin: 0;
        font-family: Arial;
        font-size: 17px;
    }
    #nav {
        background-color: #222;
    }
    #nav_wrapper {
        width: 960px;
        margin: 0 auto;
        text-align: left;
    }
    #nav ul {
        list-style-type: none;
        padding: 0;
        margin: 0;
        position: relative;
        min-width: 200px;
    }
    #nav ul li {
        display: inline-block;
    }
    #nav ul li:hover {
        background-color: #333;
    }
    #nav ul li a, visited {
        color: #CCC;
        display: block;
        padding: 15px;
        text-decoration: none;
    }
    #nav ul li:hover ul {
        display: block;
    }
    #nav ul ul {
        display: none;
        position: absolute;
        background-color: #333;
        border: 5px solid #222;
        border-top: 0;
        margin-left: -5px;
    }
    #nav ul ul li {
        display: block;
    }
    #nav ul ul li a:hover {
        color: #699;
    }
    Mike
    Learn Web Development - OnLine Video Training OnTargetHTML5
    Have Questions On Training or Web Development: Contact Mike

    Comment


    • #3
      There is no such thing as a <marquee> tag - marquees are done either with CSS or JavaScript (the difference being that when done with CSS the content must completely disappear before it can start again whereas JavaScript can make it continuous).

      Those attributes on the body tag ceased to exist in 1997 when they were replaced by CSS.
      Stephen
      Learn Modern JavaScript - http://javascriptexample.net/
      Helping others to solve their computer problem at http://www.felgall.com/

      Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

      Comment


      • #4
        Originally posted by felgall View Post
        There is no such thing as a <marquee> tag - marquees are done either with CSS or JavaScript
        Let's be 100% accurate on that, <marquee> was a IE proprietary tag that was never officially part of any HTML specification. It was rejected for acceptance into HTML 4 because what it DOES was considered a giant middle finger to accessibility... which is why really none of us has any business recreating that train wreck of stupidity with CSS or JavaScript!

        that said, ugh that code... attributes that have ZERO business being used on any HTML written after 1997 like bgcolor, leftmargin, or topmargin... if you've got the pointless HTML 5 NAV tag what's the DIV for? If you've got a UL what's the DIV for? You aren't doing anything that couldn't be applied directly to the UL. Anchors without href are just asking for rendering or behavioral bugs, all that static style="" garbage has zero business in the HTML, and really that fixed 960px fixed width and 17px fixed font size is telling users with accessibility needs to go plow themselves.

        Of course, even the first line proudly proclaims it -- tranny document, which quite literally means "in transition from 1997 to 1998 development practices".

        Methinks we might have to take a step back and teach you some basics of HTML and CSS.

        Though I have to ask, WHAT keeps changing your code from <marquee> to <p>? Are you using some goofy editor that tries to autocorrect bad/invalid code for you? Dreamweaver, Frontpage, Web Expression? Something along those lines of nube-predating scam bait?
        Walk the dark path, sleep with angels, call the past for help.
        https://cutcodedown.com
        https://medium.com/@deathshadow

        Comment


        • #5
          Originally posted by deathshadow View Post
          Let's be 100% accurate on that, <marquee> was a IE proprietary tag that was never officially part of any HTML specification.
          That's what I meant by no such thing - it was never a part of the standard, never even acknowledged by the standard (as the proprietary <iframe> tag was) and so is not HTML.

          You can build the equivalent of what that tag did using a couple of lines of CSS 3 - not that anyone should ever want to.
          Stephen
          Learn Modern JavaScript - http://javascriptexample.net/
          Helping others to solve their computer problem at http://www.felgall.com/

          Don't forget to start your JavaScript code with "use strict"; which makes it easier to find errors in your code.

          Comment

          Working...
          X