gilgimech
11-22-2010, 06:13 PM
This is driving me crazy!!!!
I have this bit of PHP code that's breaking my CSS layout.
<?php
if ($user->data['is_registered']) { ?>
<div id="user_menu">
<a href="<?php echo $forum; ?>/ucp.php?mode=logout&sid=<?php echo $user->data['session_id'] ?>">Logout</a><br>
<a href="<?php echo $forum; ?>/search.php?search_id=newposts">View new Posts</a><br>
<a href="<?php echo $forum; ?>/ucp.php?i=pm&folder=inbox">View new PM\'s</a><br>
<a href="<?php echo $forum; ?>/ucp.php">User CP</a><br>
<a href="<?php echo $forum; ?>/ucp.php?i=profile&mode=signature">Edit Signature</a><br>
<a href="<?php echo $forum; ?>/search.php?search_id=egosearch">My Posts</a><br />
</div>
<?php } else { ?>
<form method="post" action="<?php $root.$login_page ?>" name="Username" target="_self" >
<div id="login_title" >
Forum login
</div>
<div id="username_lable">
Username
</div>
<div id="usename_textbox">
<input class="forminput" value=" User Name" onfocus="this.value=''" id="username" name="username" size="16" />
</div>
<div id="password_lable">
Password
</div>
<div id="password_textbox">
<input class="forminput" value="password" type="password" onfocus="this.value=''" id="password" name="password" size="16"/>
</div>
<div id="form_submit">
<input class="forminput" type="image" src="../../images/login_submit_btn.jpg" value="Log in" name="login" />
</div>
</form>
<a href="http://127.0.0.1/forum/ucp.php?mode=register"><img src="../../forum/styles/prosilver/theme/images/icon_register.gif" width="16" height="14" />Register</a>
</div>
<div id="forgot_pass_link">
<a id="login_box_open" href="http://127.0.0.1/forum/ucp.php?mode=sendpassword">Forgot Your Password?</a>
</div>
<?php } ?>
I don't think it's the CSS because the else statement works fine with my css. It's the if statement that breaks it. It seems that the php if floating outside of the wrapper div, but I can't figure out how to correct this.
I have this bit of PHP code that's breaking my CSS layout.
<?php
if ($user->data['is_registered']) { ?>
<div id="user_menu">
<a href="<?php echo $forum; ?>/ucp.php?mode=logout&sid=<?php echo $user->data['session_id'] ?>">Logout</a><br>
<a href="<?php echo $forum; ?>/search.php?search_id=newposts">View new Posts</a><br>
<a href="<?php echo $forum; ?>/ucp.php?i=pm&folder=inbox">View new PM\'s</a><br>
<a href="<?php echo $forum; ?>/ucp.php">User CP</a><br>
<a href="<?php echo $forum; ?>/ucp.php?i=profile&mode=signature">Edit Signature</a><br>
<a href="<?php echo $forum; ?>/search.php?search_id=egosearch">My Posts</a><br />
</div>
<?php } else { ?>
<form method="post" action="<?php $root.$login_page ?>" name="Username" target="_self" >
<div id="login_title" >
Forum login
</div>
<div id="username_lable">
Username
</div>
<div id="usename_textbox">
<input class="forminput" value=" User Name" onfocus="this.value=''" id="username" name="username" size="16" />
</div>
<div id="password_lable">
Password
</div>
<div id="password_textbox">
<input class="forminput" value="password" type="password" onfocus="this.value=''" id="password" name="password" size="16"/>
</div>
<div id="form_submit">
<input class="forminput" type="image" src="../../images/login_submit_btn.jpg" value="Log in" name="login" />
</div>
</form>
<a href="http://127.0.0.1/forum/ucp.php?mode=register"><img src="../../forum/styles/prosilver/theme/images/icon_register.gif" width="16" height="14" />Register</a>
</div>
<div id="forgot_pass_link">
<a id="login_box_open" href="http://127.0.0.1/forum/ucp.php?mode=sendpassword">Forgot Your Password?</a>
</div>
<?php } ?>
I don't think it's the CSS because the else statement works fine with my css. It's the if statement that breaks it. It seems that the php if floating outside of the wrapper div, but I can't figure out how to correct this.