Where do I put the padding in an Unordered List?

I have an unordered list and if I use inline styling it displays exactly how I want it to do.

My question is where do I put the padding-left element in the CSS.

The web page is:http://www.c5d.co.uk/stalybridge1939.php and you will see that there is a space between the colon and the html link. That is currently made by adding a nbsp; to the link. Clumsy, but adequate.

I have tried adding padding-left to the li, div and whole list without success, Where should the padding go to enable a space to be egnerated automatically?

This is the CSS

.index1939 {
    list-style-type:none;      /* 1939 census pages*/
	display:table;
	margin:0 auto;
	padding:0;
}

.index1939 li {
    display:table-row;
    text-align:left;
    padding:0;
}

.index1939 p {
    display:table-cell;
    text-align:left;
    padding:3px 0;
}

.index1939 div {
    display:table-cell;
    padding-left:3px;
}

.index1939 {
    padding-left:5px;
}

Unless Iā€™m looking at the wrong thing you already have some padding in place which you can increase as you wish.

.index1939 div {
    display: table-cell;
    padding-left: 3px;/* increase this padding-left as required*/
}

e,g,

Thank you.

You were right, but I had tried increasing the padding.

Clearing the cache solved the issue.

Thanks for pointing me in the right direction.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.