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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T09:05:21+00:00 2026-05-18T09:05:21+00:00

I am unable to remove some spaces between a td and ul. Below is

  • 0

I am unable to remove some spaces between a td and ul.

Below is the piece of code

<html>
<head>
<link href="gs.css" type="text/css" rel="Stylesheet" />
</head>
<body>
<table width="100%">
<tr>
<td width="100%" class="posMenuLevel1" style="border :1px solid gray;">
<br />
<ul class="menuLevel1">
<li>
<a href="" >ABCD</a>
</li>
<li>
<a href="" >EFGH</a>
</li>
<li>
<a href="" >IJKL</a>
</li>
<li>
<a href="" >MNOP</a>
</li>
</ul>
<br />
</td>
</tr>
</table>
</body>
</html>

gs.css

.posMenuLevel1
{
text-align: left;
vertical-align: top;
}

.menuLevel1 li
{
display: inline;
list-style-type: none;
}

.menuLevel1 li a
{
padding: 5px;
text-decoration: none;
background-color: #EE7600;
color: #000000;
}

.menuLevel1 li a:visited
{
color: #000000;
}

.menuLevel1 li a:hover
{
text-decoration: underline;
}

On running this, you would notice that there is a space on the left, just before the menu/links start.

If I do a right align, the spaces do not appear.

Not sure on why the spaces appear while aligning them to the left

Any help would be appreciated. Thanks

  • 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-18T09:05:21+00:00Added an answer on May 18, 2026 at 9:05 am

    The ul has margin/padding by default to provide the indent for list items. You need to reset that:

    .menuLevel1 {margin: 0; padding: 0;}

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

Sidebar

Related Questions

I am rendering a similar construct to the below with some server side code.
I have some xml files with figure spaces in it, I need to remove
Why is the compiler unable to infer the correct type for the result from
I am trying to link some user docs to my Java Swing application. The
I'm having trouble removing some duplication I've introduced in a rails plugin. The code
Greetings, I've read some threads about this topic, but actually I was unable to
I have an ASP.NET site and I've been doing some work refactoring code to
I'm trying to install some custom Windows services using PowerShell, and I've been unable
Unable to find a SQL diff tool that meets my needs, I am writing
I am unable to consume messages sent via ActiveMQ from my Flex client. Sending

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.