Need Help Fixing Simple Nesting Error

Discussion in 'HTML & Website Design' started by wvcaudill2, Jan 17, 2010.

  1. #1
    Hello everyone! Ive been working on a new layout virtually nonstop for two days, and I could really use your help in spotting an error.

    First, go here:
    http://www.newtuts.com/index.php

    Here, everything looks normal. However, its when you login that things become a problem.

    See what I mean by logging in. You can use the username "test" and the password "test".

    Once logged in, the layout becomes screwed up. I think its because once you are logged in, there is 1 two many div's. Below is the code I am using, maybe you guys can figure out where I messed up?

    Im thinking an extra </div> will have to go inside one of the if statements, im just not sure where, and quite frankly, my brain needs a rest.

    		<p><span><img src="$config[HTTP_SERVER]images/3.0/lock.gif"  alt=""/><b class="fs">Login</b> </span>
    <if condition="$config[is_logged_in] == 1">
    				<center>        		
            		<span class="message">$glob[user_message]</span><br>
            		You are logged in, <strong>$config[username]</strong><br>
            		<a href="$config[HTTP_SERVER]?act=logout">[ Logout ]</a> 
            		<if condition="$config[MOD_REWRITE_ON] == 1">
                <a href="$config[HTTP_SERVER]users/$config[userid]/">[ Profile ]</a>
                <else />
                <a href="$config[HTTP_SERVER]users.php?userid=$config[userid]">[ Profile ]</a><br>
                </if>
            		</center>	
            <else />
            		<center>
            		<span class="message">$glob[user_message]</span>	
            		</center>
                <form action="$config[PHP_SELF]" method="POST"><br />
    		<div class="login">
    			<ul>
    				<li class="lo_l">User name:</li>
    				<li class="lo_r">
    					<input class="lo_inp" type="text" name="username">
    				</li>
    			</ul>
    		</div>
    		<div class="login">
    			<ul>
    				<li class="lo_l">Password:</li>
    				<li class="lo_r">
    					<input class="lo_inp" type="password" name="password">
    				</li>
    			</ul>
    		</div>
    		<div class="login">
    			<ul>
    				<li class="lo_l"> </li>
    				<li class="lo_r">
    					<input name="loginform" type="submit" value="Login" class="lo_but" /> &nbsp;
                <if condition="$config[MOD_REWRITE_ON] == 1">
                              <a href="$config[HTTP_SERVER]register/" class="blue"> Register </a>
                <else />
                <a href="$config[HTTP_SERVER]register.php" class="blue"> Register </a>
                </if>
               </form>
             </if>				</li>
    			</ul>
    		</div>
            <a href="$config[HTTP_SERVER]que/">>> <strong>Que</strong></a><br>
            <a href="$config[HTTP_SERVER]pending/">>> <strong>Pending</strong></a>
    	</div>
    	<div class="clear"></div>
    </div>
    Code (markup):
     
    wvcaudill2, Jan 17, 2010 IP
  2. jwitt98

    jwitt98 Peon

    Messages:
    145
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #2
    jwitt98, Jan 17, 2010 IP
    wvcaudill2 likes this.
  3. wvcaudill2

    wvcaudill2 Peon

    Messages:
    176
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #3
    wvcaudill2, Jan 18, 2010 IP
  4. jwitt98

    jwitt98 Peon

    Messages:
    145
    Likes Received:
    9
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Glad you were able to learn something from a simple pointer. It just goes to show that some people just need pointed in the right directions, and others... well, you know.
     
    jwitt98, Jan 18, 2010 IP
  5. johagulo

    johagulo Peon

    Messages:
    879
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Try to search on w3 schools for aid
     
    johagulo, Jan 19, 2010 IP