Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jan 2014
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Whats wrong with my coding?

    I have two bits of HTML coding, one for a navigation bar, the other for a chat widget but for some reason my chat widget keeps on messing with the navigation bar. What have I done wrong?

    Coding:



    Code:
    <!DOCTYPE HTML>
    <html>
    <head>
    <link rel="stylesheet" type="text/css" href="style.css" />
    
    <ul id="menu_wrap" class="Black"><li class="button"><a href="#">Groups</a></li><li class="button"><a href="#">Profile</a></li><li class="button"><a href="#">
    
    <script src="https://apps.imoapi.com/imo.im/api/
    <script src="chat_example.js"></script>
    </head>
    <body>
    <center>
    <form id="name_form">
    Name:
    <input type=text id="name_input"
    style="width: 165px; margin: 2px" disabled>
    <input type="submit" id="connect_button" value="Connect"
    style="width: 70px; margin: 2px" disabled>
    </form>
    <textarea id="chat_box" readonly="readonly"
    style="width: 290px; height: 250px;
    margin: 2px; resize: none"></textarea>
    </textarea>
    <form id="message_form">
    <input type=text id="message_input"
    style="width: 220px; height: 18px; margin: 2px" disabled>
    <input type="submit" id="send_button" value="Send"
    style="width: 60px; margin: 2px" disabled>
    </form>
    </center>
    </body>
    </html>

  • #2
    New to the CF scene
    Join Date
    Jan 2014
    Posts
    8
    Thanks
    0
    Thanked 2 Times in 2 Posts
    Hello,

    The struct of your html code it's wrong, because <ul> it's on the <head>, <center> it's not in Html5..

    Correct Struct:

    Code:
    <!DOCTYPE html>
    <html lang="en">
    <head>
        <link rel="stylesheet" type="text/css" href="style.css" />
    
        <script src="https://apps.imoapi.com/imo.im/api/"></script>
        <script src="chat_example.js"></script>
    </head>
    <body>
    
    <header>
        <nav>Nav Here's</nav>
    </header>
    
    <section id="mywidgetcontainer">
    
        <div class="mychat">
            <form id="name_form">
                Name:
                <input type=text id="name_input"
                       style="width: 165px; margin: 2px" disabled>
                <input type="submit" id="connect_button" value="Connect"
                       style="width: 70px; margin: 2px" disabled>
            </form>
            <textarea id="chat_box" readonly="readonly"
                      style="width: 290px; height: 250px;
        margin: 2px; resize: none"></textarea>
            </textarea>
            <form id="message_form">
                <input type=text id="message_input"
                       style="width: 220px; height: 18px; margin: 2px" disabled>
                <input type="submit" id="send_button" value="Send"
                       style="width: 60px; margin: 2px" disabled>
            </form>
        </div>
    
    </section>
    
        </body>
        </html>

  • #3
    Master Coder Excavator's Avatar
    Join Date
    Dec 2006
    Location
    Alaska
    Posts
    9,672
    Thanks
    22
    Thanked 1,827 Times in 1,811 Posts
    Hello mycoding,
    Something that really helps when coding is validating. See the links in my signature about validation.

    devpy is on the right track but his code is invalid also.
    Validate often DURING development - Use it like a splelchecker | Debug during Development |Write it for FireFox, ignore IE
    Use the right DocType | Validate your markup | Validate your CSS | Why validating is good | Why tables are bad


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •