tags:

views:

521

answers:

9

I am using jQuery for the first time via the Views Cycle module for Drupal. I am not a CSS pro, but I am pulling my hair out trying to remove the bullets from the rotating images on this page: http://shoshannabauer.com/

What am I missing? Does the list-style go on the <li> or on the <ul> class?

+13  A: 

list-style goes on the <ul> class.

ul { list-style: none; }
Shawn Steward
I think that doesn't matter in this case, bacause the list-elements have customized bullets in the form of an background-image of a bullet and padding-left for the text.
RamboNo5
The custom bullets you're referring to are in the left menu, not on the images he's trying to remove them from.
Shawn Steward
Oh dear, I missed that!
RamboNo5
And, obviously, the OP can limit this to a specific class rather than just UL, but this was just an example.
Shawn Steward
Here's a great article I always reference on this very topic: http://www.alistapart.com/articles/taminglists/
sotangochips
A: 

The list-style goes in the tag <ul>.

kiamlaluno
+1  A: 

Try using list-style-type on the list

ul { list-style-type:none; }
Scott Saunders
+5  A: 

edit: Shawn is right. This here is the reason for the bullets in your navigation on the left.

Take a look at your css, you have an image of a bullet there.

li.leaf {
    background:transparent url(images/menu-leaf.gif) no-repeat scroll 1px 0.4em;
    list-style-image:none;
    list-style-type:none;
    margin:0;
    padding:0 0 0 1.5em;
}

Your list elements have kind of custom bullets in the form of a background-image of a white bullet and a padding-left of 1.5em

RamboNo5
Congratulations! You were the first to actually look at the page! +1
Boldewyn
The .leaf class only applies to the navigation menu on the left. The OP is trying to remove the standard bullets from the images in the body of the page, which have no class on the LI elements.
Shawn Steward
+1  A: 

try:

list-style: none;

on

Estelle
A: 

Adding to RamboNo5's answer:

ul.menu li, .item-list ul li, li.leaf {
    background: none;
}

fixes this. The bullets were not browser-generated but background images.

Boldewyn
A: 
ul{
list-style:none;
}
  • you might have to remove the list-style from the li too, in this case use:

    ul li{ list-style:none; }

good luck

waaab crew
A: 

Actually, assuming you want to keep the bullets in the left menu... if you look in your style.css?b css file, under your /* lists */ and remove this line, it'll fix the problem (it's a duplicate and over-riding all the other styling)

ul li {
 background:transparent url(images/menu-leaf.gif) no-repeat 1px .4em;
 list-style-image:none;
 list-style-type:none;
 margin:0;
 padding:0 0 0 1.5em;
}
fudgey
+2  A: 

Here is some jQuery which will remove the bullet for you:

$(document).ready(function(){
     $('ul.viewsCycle-processed').css({background:'transparent'}).find('> li').css({background:'transparent'});
});

And if you want to add a css stylesheet to the page:

ul.viewsCycle-processed { background:transparent !important; }
ul.viewsCycle-processed li { background:transparent !important; }
Jim Schubert
This one was actually the most reliable. While you would expect that list-style: none would work, it did not unless I set it site wide. Instead, it looks like the HTML this page was using needed to have the background for the ul's set to transparent to override.
Mike Bohlmann
That's really unnecessary, it's just covering up a missed bug or style somewhere.
Shawn Steward
Well, he could change the styles in the css file, but if he ever updates the cycle plugin and overwrites the stylesheet, he'll have the same problem. The jQuery is a little overkill, but that's how his question was tagged. Adding the styles inline on the page containing the cycling images would prevent this problem on updates (as long as they don't update class names) and it will occur immediately since it's not javascript.
Jim Schubert
@Shawn, and the 'bug' is that the plugin uses background styles to generate the bullets instead of list-style.
Jim Schubert
@Jim Nice catch. @Mike Use a different plugin! lol
Shawn Steward