Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Results 1 to 9 of 9
Like Tree2Likes
  • 1 Post By Ronald Roe
  • 1 Post By Ethansev

Thread: Confused

  1. #1
    Junior Member
    Join Date
    Sep 2013
    Posts
    4
    Member #
    37177
    Liked
    1 times

    Confused

    The CSS is not working which is noted on there. This is for a school project ^^
    <html>
    <title>Educated We Stand</title>
    <table width="100%" border="0">
    <style type="text/css">
    h1 {text-align:center} <!-- these aren't working, neither are <p classes
    p1 {Font-family:Arial;color:red;}
    {
    background-color:#d0e4fe;
    }
    </style>
    <script>
    function myFunction()
    {
    x=document.getElementById("demo") // Find the element
    x.style.color="#ff0000"; // Change the style
    }
    </script>
    <body>
    <div id="header" style="background-color:#CC0000;">
    <h1 style="margin-bottom:0;">Educated We Stand</h1></div>
    <tr valign="top">
    <td style="background-color:#FFCCFF;width:20%;
    text-align:center;">
    <b>Main Menu</b><br />
    <li><a href="default.asp" target="_blank">Academic Defintions</a></li>
    <br>
    <li><a href="default.asp" target="_blank">Student-friendly Definitions</a></li>
    <br>
    <li><a href="default.asp" target="_blank">Literary Terms</a></li>
    <br>
    <li><a href="default.asp" target="_blank">Authorial Techniques</a></li>
    <br>
    <li><a href="default.asp" target="_blank">Contact Us</a></li>
    <br>
    <li><a href="default.asp" target="_blank">About</a></li></div>
    </td>
    <td style="background-color:#eeeeee;height:600px;
    width:60%;text-align:top;">
    <p=class="Info"><h2>Enter Information Here </h2></p>
    <p>You have reached our website where we will teach you language arts better than your teacher ></p>
    <p1>Here are some insanely awesome pictures of tacos!</p1>
    <img src="http://cdn.sheknows.com/articles/Tacos.jpg" alt="cdn.sheknows.com" width="815" height="545">
    </td>
    <td style="background-color:#FFCCFF;
    width:20%;text-align:top;">
    <b>Ads Are Here</b><br/>

    </td>
    </tr>
    <table>
    </body>
    </html>

  2.  

  3. #2
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    p1 isn't an html tag.

    Change it to p class="p1" and then change the CSS to .p1 (note the period) and you'll get what you want.

    If it's for a student project, why is there an "Ads are Here" space?
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  4. #3
    Junior Member
    Join Date
    Sep 2013
    Posts
    4
    Member #
    37177
    Liked
    1 times
    Quote Originally Posted by TheGAME1264 View Post
    p1 isn't an html tag.

    Change it to p class="p1" and then change the CSS to .p1 (note the period) and you'll get what you want.

    If it's for a student project, why is there an "Ads are Here" space?
    Well it's supposed to be like an educated website and those usually have ads or something =P

  5. #4
    Junior Member
    Join Date
    Sep 2013
    Posts
    4
    Member #
    37177
    Liked
    1 times
    Well my project is due in 3 days and I feel like I don't have enough time to code all of it since I barely even know how to make a layout. Any suggestions on websites that help you make it quickly?

  6. #5
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    Not that will let you do it well. Notepad++ will help you with syntax highlighting, but that's about it.

    By the way:

    <title>Educated We Stand</title>
    <table width="100%" border="0">

    Take the table tag out.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)

  7. #6
    Senior Member Ronald Roe's Avatar
    Join Date
    Mar 2011
    Location
    Oklahoma City
    Posts
    3,141
    Member #
    27197
    Liked
    959 times
    What class is this for? God help us if that's the way they're teaching people to code.
    Don't get me wrong, it doesn't appear to be any fault of your own, but that code looks like it's straight out of 1998.
    Fireproofgfx likes this.
    Ron Roe
    Web Developer
    "If every app were designed using the same design template, oh wait...Bootstrap."

  8. #7
    Junior Member
    Join Date
    Sep 2013
    Posts
    4
    Member #
    37177
    Liked
    1 times
    It's for language arts, and we could have used tumblr or something but I'm just learning from w3schools xD Any other suggestions to make it better?
    Ronald Roe likes this.

  9. #8
    Senior Member kralcx's Avatar
    Join Date
    Jan 2010
    Location
    3rd Planet from the Sun
    Posts
    140
    Member #
    20799
    Liked
    18 times
    Tell your teacher this is 2013 so no tables unless it is for tabular data (which this is not), and place all of your css in an external style sheet. Then after you do that make sure your markup validates properly The W3C CSS Validation Service The W3C Markup Validation Service

    Then lastly minimize your html and css HTML Compressor - Reduce the size of HTML, CSS, JavaScript, PHP and Smarty code.
    this will show your teacher that you care about bandwidth performance.

  10. #9
    Unpaid WDF Intern TheGAME1264's Avatar
    Join Date
    Dec 2002
    Location
    Not from USA
    Posts
    14,483
    Member #
    425
    Liked
    2783 times
    I don't think the teacher told him to do that. Since he's using W3Schools, it looks like he's trying to branch out on his own and learn something. I'm going to give both the school and him the benefit of the doubt here.

    Other than that, what kralcx said.
    If I've helped you out in any way, please pay it forward. My wife and I are walking for Autism Speaks. Please donate, and thanks.

    If someone helped you out, be sure to "Like" their post and/or help them in kind. The "Like" link is on the bottom right of each post, beside the "Share" link.

    My stuff (well, some of it): My bowling alley site | Canadian Postal Code Info (beta)


Remove Ads

Posting Permissions

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

Tags for this Thread

All times are GMT -6. The time now is 06:42 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com