View Full Version : ul li margin problems

Apr 16th, 2010, 08:55 PM
I'm working through a template which I have limited editing on and I am struggling to find out what is causing the list under 'Catalogue' to have such a big space between the links 'Sample catagory' and 'another example'.

Is anyone able to find anything at all as I have looked in firebug and still can't see why the spacing is so big


(I hate using online editors ... blehhh)

Apr 16th, 2010, 09:13 PM
Hello Nightfire,
You don't have a DocType Declaration! One of the most important parts in making your code behave the way it's supposed to. See the link in my sig about DocTypes. I would recomend an HTML 4.01 Strict.

See the links in my sig about validating as well. They will help you.

Your non-breaking space appears to be inheriting some top margin from somewhere. I'm not sure how that will change when you add the DocType.

You should not be using   for layout anyway. You have .bullet available already, you can put some right margin on your image from there.

Don't bother doing anything until you have added the DocType though (assuming you can with what editing you're allowed).

Apr 16th, 2010, 09:17 PM
Looks like I'm stuck then :(

The ugly code you see is what I have no control over, and as for the css, well it'll be best to say nothing about it at all. One job I shouldn't have taken on lol

Apr 16th, 2010, 09:35 PM
Can you remove the non-breaking space? If so, then you might as well do away with the span as well.
Like this -

And add a bullet from the CSS like this - [CODE]li {
list-style: disc inside;

Another bullet example using images instead - http://nopeople.com/CSS/li_image/index.html

Apr 16th, 2010, 09:45 PM
Unfortunately I can't. I've been racking my brain over this 1 page for ages. It's rediculous over how little control you have over it, and what you do have, ends up getting overwritten by their code anyway.

The site uses smarty templates, and there's noway of editing (or haven't found it) the bits of code that get inserted by the smarty functions (such as the list I've been trying to change).

Think I'm just going to have to find another way of doing this somehow

Apr 16th, 2010, 10:32 PM
Scrapped the idea of the hosting with them. Advised him to go with opencart. Problem solved and headache cured.

Thanks for looking