Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5986995
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T22:45:05+00:00 2026-05-22T22:45:05+00:00

I have this written in PHP: <?php global $current_user; get_currentuserinfo(); ?> <div style=float: right;

  • 0

I have this written in PHP:

<?php global $current_user;
      get_currentuserinfo();
?>
<div style="float: right; text-align: right;">
<h4>
    <?php
        if ( is_user_logged_in() ) {
     echo 'Welcome: ' . $current_user->user_login; 
    ?>
</h4>
<p>
    <?php
        echo '<a>My Classes</a> &nbsp;&brvbar;&nbsp; <a>Logout</a>';
    } else {
    ?>
</p>
<h4>    
    <?php
      echo 'Welcome, guest!';
   ?>
</h4>
<p>
    <?php
        echo '<a>Login</a> | <a>Register</a>';
    }
    ?>
</p>
</div>

And my browser is showing this:

Welcome: Admin
| LogoutMy Classes

Why is that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T22:45:05+00:00Added an answer on May 22, 2026 at 10:45 pm

    By the look of it, you’ve got your <a> tags floated to the right. That being the case, right floated elements will always stack right to left.

    What this means is that the first element that is floated to the right will sit on the far right edge, and the second element will float on the right, but sit on the left side of the first element. To fix this, you’ll have to either (a) adjust your CSS so that the <a> tags don’t float on the right, or (b) re-order your echo statement to output “Logout” before your output “My Classes”.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have this function written: <script type="text/javascript"> function getStartDate(value) { $.post("gSearch.php", {dateSearch:value}, function(data){ $('#results').html(data);
I have this piece of code written in jQuery and PHP: <script type=text/javascript> $(document).ready(function(){
I have this nice big Dev Kit written in PHP, but the application I'm
I have this application written in PHP, I'm considering on using eAccelerator for optimizing
i am using ajax with jquery .i have written this code: $.ajax({url:myurl.php, data:datastr, type:POST,
I have written this code having not used PHP for 2 years now to
Hi I am doing one checkscript with jquery and php I have written this
I have this application written in java to calculate pageranks. And the application takes
I have this code written in .NET 4.0 using VS2010 Ultimate Beta 2: smtpClient.Send(mailMsg);
I have written this clone method for when the parent of the Employee class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.