www.webdeveloper.com
Results 1 to 9 of 9

Thread: Wrong ......?

  1. #1
    Join Date
    Feb 2012
    Posts
    264

    Wrong ......?

    There´s a lot wrong in this external stylesheet (css) and html:
    What exactly? (I´m just a beginner!):

    *{
    margin:0px;
    padding:0px;
    }

    .top
    {
    border-style:solid;
    border-width:0px;
    border-bottom-width:0px;
    border-color:#808080;
    margin:5px;
    height:300px;
    }

    .english
    {
    border-style:solid;
    text-decoration:none;
    display:block;
    border-width:0px;
    width:80px;
    height:50px;
    }

    {
    a:hover,a:active
    background-color:;
    }


    .argentinian
    {
    background-color:
    border-style:solid;
    border-width:0px;
    text-decoration:none;
    display:block;
    border-width:0px;
    width:80px;
    height8%;
    }

    {
    a:hover,a:active
    background-color:
    }

    body
    {
    background-color:#9370D8
    }

    .top
    {
    background-color:#9370D8
    border-style:solid;
    border-width:0px;
    border-bottom-width:0px;
    border-color:#808080;
    margin:5px;
    content:100%;
    height:60%;
    }





    #content
    {
    background-color:#F8F8FF;
    border-style:solid;
    border-color:#808080;
    height:256px;
    border-width:4px;
    font-family:verdana,arial,sans-serif;
    }

    .webdesign span
    {
    margin-left:11ex;
    }

    .database span
    {
    margin-left:9ex;
    }

    .translator span
    {
    margin-left:9ex;
    }

    .languages
    {
    color:red;
    }

    .languages span
    {
    margin-left:7ex;
    color:red;
    }

    .writer span
    {
    margin-left:32ex;
    }

    .image span
    {
    margin-left:23ex;
    }





    #footer
    {
    border-style:solid;
    border-color:#808080;
    border-width:0px;
    height:10em;
    line-height:90%;
    font-size:40px;
    color:#000000;
    }



    size:40px;
    color:#000000;
    }


    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
    "http://www.w3.org/TR/html4/strict.dtd">

    <HTML>

    <head>
    <meta http-equiv="content-type" content="text/ html; charset=UTF-8">
    <title>Eduard Lid</title>
    <link rel="stylesheet" type="text/css" href="ex1.css">

    </head>

    <body>

    <div class="english">
    <a href="http://www.hospedajenicolas.com"><img src="http://api.ning.com/files/h4TCXOcjBYcD*p38zBBShgNoYDPQAmuV0B6zyz7JLWOAQX8Gi*rZuZa6l9tW13Pvf-RYrknbj7mDM*49VRoLM1QJV*cNpvlk/americanflag.gif" alt="english USA" class="english"></a>
    </div>
    <div class="argentinian">
    <a href="http://www.hospedajenicolas.com"><img src="https://www.cia.gov/library/publications/the-world-factbook/graphics/flags/large/ar-lgflag.gif" alt="argentinian" class="spanish"></a>
    </div>

    <div class="top">
    </div>
    <div id="content">
    <img width="320" height="256" align="left" style="border-right:2px solid grey" src="camara 2011 049.JPG" id="foto" alt="img lago">
    <img width="320" height="256" align="right" style="border-left:2px solid grey" src="me.JPG" id="foto" alt="img Eduard Lid">
    <p class="webdesign">webdesign<span>diseño sitios web</span></p>
    <p class="database">database<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;base de datos</span></p>
    <p class="translator">translator<span>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;traductor</span></p>
    <p class="languages">&nbsp;&nbsp;spanish german<span>inglés alem&aacute;n</span></p>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>
    <h2 style="text-align:center;font-family:verdana,helvetica,sans-serif; color:#000000;">Eduard Lid</h2>
    </div>

    <div id="footer">
    </div>

    </body>
    </HTML>
    Last edited by asa; 02-26-2012 at 08:11 PM.

  2. #2
    Join Date
    Feb 2012
    Location
    Bokaro Steel City (Jharkhand), India!
    Posts
    194
    Use validator.w3.org to validate your web pages!
    You will see all the errors noted there and will be able to remove/correct them.
    Last edited by TheAliveWinner; 02-26-2012 at 09:49 PM.

  3. #3
    Join Date
    Feb 2012
    Location
    Bokaro Steel City (Jharkhand), India!
    Posts
    194
    Note:
    While posting in this forum always wrap your code inside "HTML" tags to make the code more clear to understand!

  4. #4
    Join Date
    Feb 2012
    Location
    Bokaro Steel City (Jharkhand), India!
    Posts
    194

    Post

    Errors in your html code:
    Error 1: Line 25, Column 37: there is no attribute "ALIGN"
    Help: The attribute "align" should never be used. You can use CSS properties like text-align and margin to achieve the same result!

    Error 2: Line 26, Column 97: ID "FOTO" already defined
    Help: Remember! IDs should be unique in your document! Always use different IDs.
    Or else you can use "class" instead of "id" because you can give the same class to different elements!
    Last edited by TheAliveWinner; 02-26-2012 at 10:10 PM.

  5. #5
    Join Date
    Feb 2012
    Location
    Bokaro Steel City (Jharkhand), India!
    Posts
    194
    Also you can validate your CSS document using jigsaw.w3.org/css-validator

  6. #6
    Join Date
    Feb 2012
    Location
    Bokaro Steel City (Jharkhand), India!
    Posts
    194
    This is valid CSS:
    HTML Code:
    * {
    margin : 0;
    padding : 0;
    }
    .top {
    border-style : solid;
    border-width : 0;
    border-bottom-width : 0;
    border-color : #808080;
    margin : 5px;
    height : 300px;
    }
    .english {
    border-style : solid;
    text-decoration : none;
    display : block;
    border-width : 0;
    width : 80px;
    height : 50px;
    }
    body {
    background-color : #9370d8;
    }
    .top {
    background-color : #9370d8;
    border-style : solid;
    border-width : 0;
    border-bottom-width : 0;
    border-color : #808080;
    margin : 5px;
    height : 60&#37;;
    }
    #content {
    background-color : #f8f8ff;
    border-style : solid;
    border-color : #808080;
    height : 256px;
    border-width : 4px;
    font-family : verdana, arial, sans-serif;
    }
    .webdesign span {
    margin-left : 11ex;
    }
    .database span {
    margin-left : 9ex;
    }
    .translator span {
    margin-left : 9ex;
    }
    .languages {
    color : red;
    }
    .languages span {
    margin-left : 7ex;
    color : red;
    }
    .writer span {
    margin-left : 32ex;
    }
    .image span {
    margin-left : 23ex;
    }
    #footer {
    border-style : solid;
    border-color : #808080;
    border-width : 0;
    height : 10em;
    line-height : 90%;
    font-size : 40px;
    color : #000000;
    }

  7. #7
    Join Date
    Feb 2012
    Location
    Bokaro Steel City (Jharkhand), India!
    Posts
    194

    Post Valid CSS

    This is valid CSS:
    HTML Code:
    * {
    margin : 0;
    padding : 0;
    }
    .top {
    border-style : solid;
    border-width : 0;
    border-bottom-width : 0;
    border-color : #808080;
    margin : 5px;
    height : 300px;
    }
    .english {
    border-style : solid;
    text-decoration : none;
    display : block;
    border-width : 0;
    width : 80px;
    height : 50px;
    }
    body {
    background-color : #9370d8;
    }
    .top {
    background-color : #9370d8;
    border-style : solid;
    border-width : 0;
    border-bottom-width : 0;
    border-color : #808080;
    margin : 5px;
    height : 60%;
    }
    #content {
    background-color : #f8f8ff;
    border-style : solid;
    border-color : #808080;
    height : 256px;
    border-width : 4px;
    font-family : verdana, arial, sans-serif;
    }
    .webdesign span {
    margin-left : 11ex;
    }
    .database span {
    margin-left : 9ex;
    }
    .translator span {
    margin-left : 9ex;
    }
    .languages {
    color : red;
    }
    .languages span {
    margin-left : 7ex;
    color : red;
    }
    .writer span {
    margin-left : 32ex;
    }
    .image span {
    margin-left : 23ex;
    }
    #footer {
    border-style : solid;
    border-color : #808080;
    border-width : 0;
    height : 10em;
    line-height : 90%;
    font-size : 40px;
    color : #000000;
    }

  8. #8
    Join Date
    Feb 2012
    Posts
    264
    Quote Originally Posted by TheAliveWinner View Post
    Errors in your html code:
    Error 1: Line 25, Column 37: there is no attribute "ALIGN"
    Help: The attribute "align" should never be used. You can use CSS properties like text-align and margin to achieve the same result!

    Error 2: Line 26, Column 97: ID "FOTO" already defined
    Help: Remember! IDs should be unique in your document! Always use different IDs.
    Or else you can use "class" instead of "id" because you can give the same class to different elements!
    Thanks very much!

  9. #9
    Join Date
    Feb 2012
    Posts
    264
    Quote Originally Posted by TheAliveWinner View Post
    This is valid CSS:
    HTML Code:
    * {
    margin : 0;
    padding : 0;
    }
    .top {
    border-style : solid;
    border-width : 0;
    border-bottom-width : 0;
    border-color : #808080;
    margin : 5px;
    height : 300px;
    }
    .english {
    border-style : solid;
    text-decoration : none;
    display : block;
    border-width : 0;
    width : 80px;
    height : 50px;
    }
    body {
    background-color : #9370d8;
    }
    .top {
    background-color : #9370d8;
    border-style : solid;
    border-width : 0;
    border-bottom-width : 0;
    border-color : #808080;
    margin : 5px;
    height : 60%;
    }
    #content {
    background-color : #f8f8ff;
    border-style : solid;
    border-color : #808080;
    height : 256px;
    border-width : 4px;
    font-family : verdana, arial, sans-serif;
    }
    .webdesign span {
    margin-left : 11ex;
    }
    .database span {
    margin-left : 9ex;
    }
    .translator span {
    margin-left : 9ex;
    }
    .languages {
    color : red;
    }
    .languages span {
    margin-left : 7ex;
    color : red;
    }
    .writer span {
    margin-left : 32ex;
    }
    .image span {
    margin-left : 23ex;
    }
    #footer {
    border-style : solid;
    border-color : #808080;
    border-width : 0;
    height : 10em;
    line-height : 90%;
    font-size : 40px;
    color : #000000;
    }
    Thanks very much! However, this isn´t what I´m looking for! I want the first - is equal to the third part? (the purple parts?). The first part? with on the top of the left side the 2 flags!

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles