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 9 of 9
  1. #1
    Regular Coder
    Join Date
    Oct 2008
    Location
    Poland
    Posts
    382
    Thanks
    150
    Thanked 2 Times in 2 Posts

    Please help me correct the HTML errors...

    Hello...

    This is the URL

    I think most of the errors are in the header... this is the code:
    PHP 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" <?php language_attributes(); ?>>
    <head profile="http://gmpg.org/xfn/11">
    <meta http-equiv="Content-Type" content="<?php bloginfo('html_type'); ?>; charset=<?php bloginfo('charset'); ?>" />
    <meta http-equiv="X-UA-Compatible" content="IE=8" />
    <title><?php if (is_home () ) { bloginfo('name'); } elseif ( is_category() ) { single_cat_title(); echo ' - ' bloginfo('name'); }
    elseif (
    is_single() ) { single_post_title(); }
    elseif (
    is_page() ) { bloginfo('name'); echo ': 'single_post_title(); }
    else { 
    wp_title('',true); } ?></title>
    <script type="text/javascript" src="<?php bloginfo('template_url'); ?>/script.js"></script>
    <link rel="stylesheet" href="<?php bloginfo('stylesheet_url'); ?>" type="text/css" media="screen" />
    <!--[if IE 6]><link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style.ie6.css" type="text/css" media="screen" /><![endif]-->
    <if condition="is_browser('ie', '8')"><meta http-equiv="X-UA-Compatible" content="IE=8" /></if>
    <link rel="alternate" type="application/rss+xml" title="<?php printf(__('%s RSS Feed''kubrick'), get_bloginfo('name')); ?>" href="<?php bloginfo('rss2_url'); ?>" />
    <link rel="alternate" type="application/atom+xml" title="<?php printf(__('%s Atom Feed''kubrick'), get_bloginfo('name')); ?>" href="<?php bloginfo('atom_url'); ?>" /> 
    <link rel="pingback" href="<?php bloginfo('pingback_url'); ?>" />




            <script type="text/javascript" src="swfobject/swfobject.js"></script>
            <script type="text/javascript">
                swfobject.registerObject("myFlashContent", "9.0.0");
            </script>

    <?php wp_get_archives('type=monthly&format=link'); ?>    
    <?php wp_head(); ?>
    </head>
    <body>

    <!-- ADDED BY ME -->
    <div id="floatingimage">
    <a href="http://wizazforum.pl"><img src="http://wizazforum.pl/images/statusicon/forum_new-48.png" alt="Angry face" /></a>



    </div>

    <!-- ADDED BY ME-->
    <script type="text/javascript" src="http://www.przepiekna.pl/wp-content/plugins/page-peel/pagepeel-js.php"> </script>


    <div class="PageBackgroundGradient"></div>
    <div class="Main"><div class="Sheet"><div class="Sheet-tl"></div><div class="Sheet-tr"><div></div></div><div class="Sheet-bl"><div></div></div><div class="Sheet-br"><div></div></div><div class="Sheet-tc"><div></div></div><div class="Sheet-bc"><div></div></div><div class="Sheet-cl"><div></div></div><div class="Sheet-cr"><div></div></div><div class="Sheet-cc"></div><div class="Sheet-body">
    <div class="nav">
    <ul class="artmenu">

    <?php art_menu_items(); ?>

    <!-- ADDED BY ME-->
    <li><a class="active" href="http://www.wizazforum.pl"><span><span>Wizaz forum</span></span></a> <li />




    </ul>
    <div class="l"></div><div class="r"><div></div></div></div>
    <div class="Header">



    <div class="Header-jpeg">

    </div>




    <!--[if lte IE 6]>
    <center>
    <img src="http://www.przepiekna.pl/wp-content/themes/wp_005/images/Header.jpg" style="height:125px;left:0;Position:absolute;top:0;width:998px;" />
    </center>
    <![endif]-->






    <br />
    <div style="float:left;">
    <div class="logo">




    <!--[if IE 7]>
    <h1 id="name-text" class="logo-name">
    <a href="<?php echo get_option('home'); ?>/"><?php bloginfo('name'); ?></a></h1>
    <div id="slogan-text" class="logo-text">
    <?php bloginfo('description'); ?></div>
    <![endif]-->

    </div>
    </div> 


    <div style="float:left;margin:40px 10px 0 500px;height:70px;">
    <?php echo stripslashes(get_option('wps_home_ad_468')); ?>
    </div></div>
    Please help

  • #2
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Umm okay wow...this is wrong
    Code:
    <if condition="is_browser('ie', '8')"></if>
    There is no such thing as that. If you look at the other conditional comments you will see that it should be this
    Code:
    <!--[if IE 8]><meta http-equiv="X-UA-Compatible" content="IE=8" /><![endif]-->
    This is wrong too. You are making very simple mistakes.
    Code:
    <!-- ADDED BY ME-->
    <li><a class="active" href="http://www.wizazforum.pl"><span><span>Wizaz forum</span></span></a> <li />
    It should be
    Code:
    <!-- ADDED BY ME-->
    <li><a class="active" href="http://www.wizazforum.pl"><span><span>Wizaz forum</span></span></a> </li>
    This is wrong too
    Code:
    <![if !IE]>
    <div style="position:absolute; right: 80px">
    <![endif]>
    Remove that, give that div and ID an use an IE conditional comment. You can also only have one style attribute per element.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • Users who have thanked _Aerospace_Eng_ for this post:

    utnalove (06-26-2010)

  • #3
    Regular Coder
    Join Date
    Oct 2008
    Location
    Poland
    Posts
    382
    Thanks
    150
    Thanked 2 Times in 2 Posts
    Wonderful help!! Thank you!

    BTW why this is wrong?
    PHP Code:
    <![if !IE]>
    <
    div style="position:absolute; right: 80px">
    <![endif]> 
    IE reads this code well and I tested it and it works...
    How can I make it work? Can I have an example?

    Thank you

  • #4
    Regular Coder
    Join Date
    Oct 2008
    Location
    Poland
    Posts
    382
    Thanks
    150
    Thanked 2 Times in 2 Posts
    I was also thinking... if

    PHP Code:
    <![if !IE]> 
    <
    div style="position:absolute; right: 80px"
    <![endif]> 
    is the same as

    PHP Code:
    <!--[if !IE]><!-->
    <
    div style="position:absolute; right: 80px"
    <!--<![endif]--> 
    Than I can use the second one... but not sure about the differences...
    Last edited by utnalove; 06-26-2010 at 10:41 PM.

  • #5
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    The first one is how MS says to use a down-level revealed comment but its invalid. The second one is a valid down-level revealed conditional comment so use the second one. As long as you make sure you close that div that you opened then okay but the better thing to do would be to give that div an id and apply different styles to it based off of an IE conditional comment wrapped around a stylesheet that only IE sees. All elements in XHTML need to be lowercase so things like SCRIPT need to become script. Every element must be closed. If the element has no closing element like <br> then you use <br /> instead, same goes for image elements.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • Users who have thanked _Aerospace_Eng_ for this post:

    utnalove (06-26-2010)

  • #6
    Regular Coder
    Join Date
    Oct 2008
    Location
    Poland
    Posts
    382
    Thanks
    150
    Thanked 2 Times in 2 Posts
    Thank you. Please tell me if the following would be correct:

    1. I create a file called ie.css
    2. I add the following on the header:
      PHP Code:
      <!--[if !IE]><!--><link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style.ie.css" type="text/css" media="screen" /><!--<![endif]-->
    3. In the ie.css I put the following code:
      #onlyie{
      position:absolute;
      right: 80px;
      }

    4. In the php file I put the following code

      PHP Code:
      <div id="onlyie"

    Please tell me:
    1. is that right what I wrote?
    2. Will this <div> be read by IE only?

  • #7
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Okay you may have been confused on what the down-level revealed comments do. They were meant to hide things from IE, not show them so change this
    Code:
    <!--[if !IE]><!--><link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style.ie.css" type="text/css" media="screen" /><!--<![endif]-->
    to this
    Code:
    <!--[if IE]><link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style.ie.css" type="text/css" media="screen" /><![endif]-->
    Only IE will see that stylesheet. That div now will have no styling to any browser but IE so the position:absolute; and right:80px will be applied to div in IE only.
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #8
    Regular Coder
    Join Date
    Oct 2008
    Location
    Poland
    Posts
    382
    Thanks
    150
    Thanked 2 Times in 2 Posts
    moment moment...

    PHP Code:
    <!--[if !IE]><!-->
    <
    div style="position:absolute; right: 80px"
    <!--<![endif]--> 
    Isn't this a negation meaning: This kind of DIV needs to be used for all the NON Internet Explorer browsers? Eg. FF, Chrome...?

    If I put this:

    PHP Code:
    <!--[if IE]><link rel="stylesheet" href="<?php bloginfo('template_url'); ?>/style.ie.css" type="text/css" media="screen" /><![endif]-->
    it won't have the same meaning as the

    PHP Code:
    <!--[if !IE]><!-->
    <
    div style="position:absolute; right: 80px"
    <!--<![endif]--> 
    ?

  • #9
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Right. The first one will be for all browsers except IE. The second one will be for ONLY IE browsers.
    ||||If you are getting paid to do a job, don't ask for help on it!||||


  •  

    Posting Permissions

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