HTML:
<div class="tagline">Web Portal Name</div><br />
<div id="logged_in_user_dtls" style="color:#FFF; margin-top:15px; font:bold; width:100%; position:relative; margin-left:800px;float:left;">
<span> Welcome <?php echo $_SESSION['userName'] ?> </span>
| <a href="login.php"><span> Sign Out</a> </span> </div>
When setting up my web template, I include the logged-in user's name followed by a welcome message.
Issue: When the user name is long (around 30 characters), the "Sign Out" link shifts to the right-hand side.
How can I prevent this movement of the "Sign Out" link to the right side? I have attempted adjusting the margin-left property, but it affects my overall alignment.
Update: Is there a way to keep the position of the "Sign Out" link fixed regardless of the length of the user name?