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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T17:41:05+00:00 2026-06-14T17:41:05+00:00

I’m having to issues lining up items properly in my html code. I am

  • 0

I’m having to issues lining up items properly in my html code. I am not sure why they are not lining up the way I want them to. I didn’t design this site I am just adding to it. Also this a word press page and I don’t have access to change the site wide css so I was using inline css because <style> tags go in the page header which I don’t have access to. Sorry I should have pulled the CSS out before posting the question so it was easier to follow. But I’m a programmer not a web designer, I don’t always remember that you shouldn’t use ids multiple times.

The first problem, I am having is lining up 4 items on my website. I have 2 text strings and image and a horizontal rule. I want the first string justified left, the second string justified right with the image to it’s right. I then want the <hr> to be right under that. I tried to do this by putting the first string in on div and the second string with the image in another a separate div. What I am got was 3 lines. The first string justified left on one line. The second string justified right with the image on the second line and the <hr> on the line below. I have tried playing with different alignment settings in html attributes and in css but I cannot seem to get rid of the line break after the first string. What am I missing? I know this should be simple? Could it be the wordpress css?

my second problem is similar. I have a table cell with an image in it (x in a box). I can get the image to justify right but I’m having a problem getting it to vertically align to the top of the td. What am I missing?

Here’s some example html: Is this easier to follow?

CSS:

table#one {
    width=900px; 
    margin-left: auto; 
    margin-right: auto;
}
div#div1 {
    font-size: 1em; 
    line-height: 1em; 
    font-weight: bolder; 
    padding: 0px;
}
td#td1 {
    border: none; 
    background-color: #f8d3cf; 
    width:125px; 
    height:80px; 
    border-spacing: 10px; 
    padding:0;
}
div#div2 {
    padding:0; 
    vertical-align:top;
}
a#a1 {
    padding: 0px;
}
img#img1 {
    padding: 0px;
}
td#td3 {
    border: none; 
    width:10px;
}
td#td4 {
    border: none; 
    font:.6em Arial, Helvetica, sans-serif; 
    width:125px; 
    height:20px;
}

HTML:

<table id="one">
    <tr>
        <td>
            <div id="div1">My Color Library</div>
            <div align="right" class="removeall">
                <a href="colors">
                    <img src="http://www.2100computerlane.net/workingproject/images/x-button.png" />
                    <bold>&nbsp;Remove All</bold>
                </a>
            </div>
            <HR/>
            </p>
            <div class="mycolor">
                <table><!--width="900px"  -->
                    <tr>
                        <td id='td1' align="right" valign="top"><a href="f8d3cf" id="a1"><img src="http://www.2100computerlane.net/workingproject/images/x-button.png" /></a></div></td>

                    </tr>   
                    <tr>
                        <td  id="td4">Desert Warmth<br/>70YR 56/190 A0542</td>                                                  
                    </tr>

                </table>

            </div>
        </td>
    </tr>
</table>
  • 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-06-14T17:41:07+00:00Added an answer on June 14, 2026 at 5:41 pm

    To answer your first issue, in your code you have two DIV elements:

    <div id="div1">My Color Library</div>
    <div align="right" class="removeall">
        <a href="colors">
            <img src="images/x-button.png" />
            <bold>Remove All</bold>
        </a>
    </div>
    

    DIV’s are block-level elements, which means that adjacent DIV’s are stacked vertically. So, the gap below the title is actually the area of the second DIV.

    I believe you want this:

    <div id="div1">
        My Color Library
        <div class="removeall">
            <a href="colors">
                <img src="images/x-button.png" />
                <bold>Remove All</bold>
            </a>
        </div>
    </div>
    

    CSS:

    .removeall {
        float: right;    
    }
    

    So, just place the second DIV inside the 1. DIV, and float it to the right.

    Regarding your second issue, this CSS should do the trick:

    #td1 {
        vertical-align: top;
    }
    
    #td1 img {
        vertical-align: top;   
    }
    

    Live demo: http://jsfiddle.net/BrR2c/12/show/

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

Sidebar

Related Questions

link Im having trouble converting the html entites into html characters, (&# 8217;) i
I have this code to decode numeric html entities to the UTF8 equivalent character.
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
I'm not entirely sure how I managed to jack this up. http://pretty-senshi.com If you
Is it possible to replace javascript w/ HTML if JavaScript is not enabled on
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
I want use html5's new tag to play a wav file (currently only supported
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.