views:

292

answers:

4

I have this in my CSS:

.MainMenu
{
    position: absolute;
    top:105px;
    left:15px;    
    background-color: #67E300;  
    color:White;
    border-style:double;
    border-color:White;
    list-style-type:none;
}

And this inside of the MasterPage:

<div class="MainMenu">
        <uc2:MainMenu ID="MainMenu1" runat="server" />
    </div>

And finally this code inside of the UserControl MainMenu:

<%@ 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>

Edit (forgot to ask the question, lol):

Using that code doesn't delete the bullet list. I don't want any bullets because I want to simulate a menu.

Thanks guys. :D

+2  A: 

Isn't it just

list-style:none;

rather than

list-style-type:none;

In your li/ol/ul section

For example

ol.foo>li {
    list-style:none;
}

or

.classThatTheListElementIsAMemberOf {
    list-style:none;
}
Aiden Bell
or `list-style-type`, I believe they're synonyms/aliases, but yes. Up-voted.
David Thomas
So you're saying use that style property inside of the UserControl where I actually declare the unorderedlist, etc.Is there a way for me to use my CSS instead. I'm not comfortable mixing styling and content. Thank you! :·)
Sergio Tapia
They're not quite aliases. list-style lets you set all the list style rules in one rule (think font vs. font-family).
Joe Chung
@Joe, upvoted for the clarification. Live and learn, thanks =)
David Thomas
@Papuccino, but the `list-style:none` in the CSS file for the `ul`, example: `ul {list-style: none; }`
David Thomas
Specifically, the other *list-style* properties are *position* and *image*.
Jakob
+3  A: 

Try placing the list-style-type on the UL, not on the DIV containing the UL.

.MainMenu
{
    position: absolute;
    top:105px;
    left:15px;    
    background-color: #67E300;  
    color:White;
    border-style:double;
    border-color:White;
}


.MainMenu ul
{
    list-style-type:none;
}
Nathan Taylor
Your Kung-Fu is strong. :3
Sergio Tapia
Isn't that code-fu?
Aiden Bell
A: 

You are applying the list-style-type to the div, not to the ul inside the div. Try this instead:

.MainMenu
{
    position: absolute;
    top:105px;
    left:15px;    
    background-color: #67E300;  
    color:White;
    border-style:double;
    border-color:White;
}

.MainMenu ul
{
    list-style-type:none;
}

This will apply the list-style-type to any ul inside an item with the css class MainMenu defined on it.

adrianbanks
A: 

All you need is this in your CSS:

.MainMenu ul { list-style-type: none; }

It will match the ul within the .MainMenu div, which is the final result of your above-posted code.

Splash