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

  • Home
  • SEARCH
  • 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 277029
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T01:00:37+00:00 2026-05-12T01:00:37+00:00

Im just messing around with Ruby on Rails and HTML. This question isn’t about

  • 0

Im just messing around with Ruby on Rails and HTML. This question isn’t about RoR, but HTML and CSS. When I center my body, I get this:
Help http://img88.imageshack.us/img88/2203/help.tif

How can i get the bullets to be centered next to the text as well?

Also, how can I get the while border collapse so its closer to the text?

Here is my code:

My app layout:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
   "http://www.w3.org/TR/html4/loose.dtd">

<html lang="en">
    <head>
        <%= javascript_include_tag :defaults -%>
        <title><%= page_title.capitalize -%></title>
        <%= stylesheet_link_tag 'main' %>
    </head>

    <body>
        <div id="body" style="margin:0 auto; width:600px;">
            <%= yield -%>
            <%= render :partial => "layouts/footer" -%>
        </div>
    </body>

</html>

My Page, which has the list:

<h1 id="welcome_sign">Welcome!</h1>
<h3 id= "sitemap">Site Map </h3>

<ul>
    <li><%= link_to "Animals", "/animals"%></li>
        <ol><li><%= link_to "Hello", "/animals/hello"%></li></ol>
    <li><%= link_to "Machines", "/machines"%></li>
    <ol>
        <li><%= link_to "Products", "/machines/products" %></li>
        <li><%= link_to "Report", "/machines/report" %></li>
        <li><%= link_to "Robot", "/machines/robot" %></li>
        <li><%= link_to "Show", "/machines/show" %></li>
    </ol>
</ul>

And finally, my CSS:

#footer {
    font-size: 10pt;
    padding: 10px;
}

#sitemap {
    margin-bottom: 1em;
    line-height: 1.5em;
    margin-left: 2.0em;
    padding: 10px;

}

#welcome_sign {
    padding: 10px;
 }

body {
    background-color: #CDEAFF;

}

#body {
    background-color: #fff;
    border-top: 5px solid #999;
    border-bottom: 5px solid #999;
    border-right: 5px solid #999;
    border-left: 5px solid #999;
    text-align: center;
}
  • 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-12T01:00:38+00:00Added an answer on May 12, 2026 at 1:00 am

    I’m assuming that when you say you want the list centered, what you actually want is to center the bounding box around the list. Using the table display mode on it and setting auto margins works for everything except for IE. For the sake of IE, you instead have to set a width on the list.

    Another thing that should be fixed is the way that you’re building the list. The only elements that should appear inside of an ul element are li elements. In other words, the ol’s should appear inside of the li’s.

    Here it is all put together:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" 
      "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
      <head>
        <style type="text/css">
          h1, h3 { text-align: center; }
          ul { margin-left: auto; margin-right: auto; width: 100px; }
        </style>
      </head>
      <body>
        <h1 id="welcome_sign">Welcome!</h1>
        <h3 id="sitemap">Site Map</h3>
        <ul>
            <li>
              Animals
              <ol>
                <li>Hello</li>
              </ol>
            </li>
            <li>
              Machines
              <ol>
                <li>Products</li>
                <li>Report</li>
                <li>Robot</li>
                <li>Show</li>
              </ol>
            </li>
        </ul>  
      </body>
    </html>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 189k
  • Answers 189k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer The anchor tag should have an href attribute, not src. May 12, 2026 at 5:50 pm
  • Editorial Team
    Editorial Team added an answer coffeeaddict, The lastIndexOf() method returns the position of the last… May 12, 2026 at 5:50 pm
  • Editorial Team
    Editorial Team added an answer I'm having the exact same problem. I've submitted the issue… May 12, 2026 at 5:50 pm

Related Questions

Im just messing around with Ruby on Rails and HTML. This question isn't about
I recently upgraded one of my applications to Rails 2.2.2. Having done that, I've
I'm exploring several possibilities for developing a new system (web application). I'm an old
I'm just finishing up a computer architecture course this semester where, among other things,
Edit: When I say SQL Server, I'm really talking about the Management Studio. Sorry

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.