gilgimech Posted November 22, 2010 Share Posted November 22, 2010 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. Quote Link to comment https://forums.phpfreaks.com/topic/219486-php-breaking-css-format/ Share on other sites More sharing options...
gilgimech Posted November 22, 2010 Author Share Posted November 22, 2010 Solved Quote Link to comment https://forums.phpfreaks.com/topic/219486-php-breaking-css-format/#findComment-1138026 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.