How to Remove the Awkward Margin to the Left of my Unordered List?


Tags: html,css

Problem :

I have this UnorderedList:

alt text

CSS:

.MainMenu
{
    position: absolute;
    top:125px;
    left:15px;    
    background-color: #033E6B;
    color:White;
    border-style:double;
    border-color:White;
}

HTML:

<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MainMenu.ascx.cs" Inherits="LoCompro.UserControls.MainMenu" %>
<ul>
    <li>Inico</li>
    <li>Navegar Por Categoria</li>
    <li>Navegar Por Marca</li>
    <li>Buscar</li>
</ul>

How can I make it so the List Items dont leave a huge gap on the left? I want it to appears neatly in a box. Thank you!



Solution :

ul
{
     padding-left:0px;
     margin-left: 0px;
}

I suggest using firebug, a FireFox plugin to find these types of issues. Click element in question, then look at it's "layout." It'll tell you exactly where padding and margins are coming from.


    CSS Howto..

    How to get the system accent color for UWP-Apps?

    How to draw image dynamically on a canvas line between two cells

    How can I make it so that my logo on the top left of the page lines up with the text underneath it?

    How to properly position DIVS on a page to

    CSS: How to increase distance between two elements?

    Create dom elem on the fly or hide/show

    How to chose which CSS rule to use from multiple style sheets

    IE11 dosen't show CSS-Content properly

    How to make ASP CheckBoxList labels stay on same line as checkbox

    How to use nested p tags in CSS and Bootstrap boxes?

    how to place bg image with css

    How can i place a child div on a fixed position of a parent div that when i change place of parent then child should move automatically?

    How to make this image blur with css

    Font not showing properly in HTML page

    How to write regex to extract specific key format and value from CSS file?

    How can I change the selection text background using CSS?

    How to install preexisting html, css and dreamweaver files into dreamweaver cs6?

    How to make background image fade in with css when page loads?

    How to make DIVs flow to the left in a x-scrollable pane with CSS?

    Mapbox GeoJSON loaded via local URL: icons not showing popup properties

    How to edit css for jquery datepicker prev/next buttons?

    How to apply gradient to element with correctly display in IE9?

    How to line up a label to the right of a styled checkbox

    How to Prevent My CSS From Clashing With Facebook's CSS?

    How can i have CSS3 animating menu like followbubble.com

    HTML/CSS: how to expand a table row i only one direction?

    CSS how to vertically align text within a pseudo element

    How can I make a DIV background change color on hover if the DIV has a class of “disabled”? [closed]

    How to make a custom checkbox and radio button in pure css?

    CSS HTML How to align image within div to bottom right