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 6717163
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T08:49:12+00:00 2026-05-26T08:49:12+00:00

On this page: http://friendsconnect.org/mainbar.php I am trying to acuratly align the button with equal

  • 0

On this page: http://friendsconnect.org/mainbar.php I am trying to acuratly align the button with equal space from the picture to the sides of the browser.

I can do it well with Chrome but the other browsers (damn IE) display it slightly off. And, of course if I make a change in one browser it affects the others.

Here is the more specific code:

<div style="text-align: right; width: 100%; padding: 0px 0px 0px 0px;">
    <table style="height: 35px; float: right;"><tr><td style="vertical-align: middle;">
        <div style="text-align: right;"><strong><?php print($user_full_name); ?> (<?php print($user_username); ?>)<br/></strong></div>
        </td><td style="vertical-align: middle;">
        <div style="text-align: right; padding: 0px 5px 0px 5px;float: right;"><img style="float: right; width: 25px; height: 25px" src="<?php print($user_current_propic); ?>&h=25&w=25&zc=1"></div>
        </td><td style="text-align: middle"><div style="margin-top: 1px;"><button id="options">Settings</button><button id="select">Settings</button></div></td></tr></table>
    </div>

And of course a pastie for good measure: http://pastie.org/private/fpnhyc94ekeezdscko5ihw.

  • 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-26T08:49:13+00:00Added an answer on May 26, 2026 at 8:49 am

    To answer your question specifically:

    CSS:

    /* Get the whole thing on the right side. */
    .mainbar {
        float: right;
    }
    /* Each direct child element should be block, so that <img>s don't have a
    space below them, and things like <span> elements act consistently, etc. The
    line-height will vertically align text. Floating acts similar in most
    modern browsers. */
    .mainbar > * {
        display: block;
        float: left;
        margin: 5px 10px 5px 0;
        line-height: 25px;
    }
    /* I did not re-create your button, but it should be CSS-based. */
    .mainbar-button {
        height: 25px;
        width: 100px;
        border: 1px solid #333;
    }
    

    HTML:

    <div class="mainbar">
        <span>Pete Allport (pcallport)</span>
        <img src="./FriendsConnect   My dashboard_files/create_user_image.php" />
        <div class="mainbar-button">Settings</div>
    </div>
    

    And there is no jQuery involved the spacing of your layout; jQuery is a JavaScript wrapper, and will always be between <script></script>.

    In case you’re interested in best practices

    • Tables are for tabular data, and even then dt, dl, and dd tags are more semantic. You should start learning about CSS layouts.

    • Inline CSS should be avoided as much as possible, try using more class and id attributes.

    • <script></script> should be placed at the very bottom of your page, so that it doesn’t load until after your DOM structure has visually compiled for your user (perceptually faster loading times).

    • Notice in my example all the shorthand, e.g. 3 digit hex codes for color, and margin: north east south west values, etc.

    I’d suggest a few tools, in case you don’t have them already

    • Chrome: Use the built-in inspector, it’s awesome!
    • Firefox: Firebug
    • IE (God forbid): Firebug lite

    Happy coding!

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

Sidebar

Related Questions

From this page: http://www.doctrine-project.org/documentation/manual/1_2/en/working-with-models#dealing-with-relations:creating-related-records You can see that it says $obj['property']; is the recommended
This page: http://blog.ostermiller.org/convert-java-outputstream-inputstream describes how to create an InputStream from OutputStream: new ByteArrayInputStream(out.toByteArray()) Other
I have this page: http://www.comehike.com/hiking.php <div style=align:center> <div id=fb-root></div> <script src=http://connect.facebook.net/en_US/all.js#appId=217585988283772&amp;xfbml=1></script> <fb:like href= send=true
On this page ( http://www.comehike.com/hikes/hiking_group.php?hiking_group_id=2 ), I'm trying to get on the right side,
On this page: http://friendsconnect.org/chat/ you can see a very simple chat. How can I
I am mostly following this page: http://tomcat.apache.org/tomcat-6.0-doc/ssl-howto.html I used this command to create the
in this page: http://www.studiokhalid.com/test/jquery/2.html I am trying to use a simple Jquery Coda slider
On this page: http://flowplayer.org/tools/tabs/slideshow.html Halfway down the page I find this code under the
This page says that GCC 4.5 has C++ raw string literals: http://gcc.gnu.org/projects/cxx0x.html But when
I'm working on this page: http://sydneypadua.com/2dgoggles/ And I'm trying to redefine the width of

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.