dcsimg
www.webdeveloper.com
Results 1 to 3 of 3

Thread: CSS <ul> and <li> alignment issues

  1. #1
    Join Date
    Apr 2010
    Posts
    5

    Question CSS <ul> and <li> alignment issues

    Greetings all,

    I am trying to make a website with a selling page. This selling page lists the benefits of having an account, and these benefits are listed using a <ul>

    The <ul> has an image of a checkmark. However, I cannot get the text to align properly in the css. The text is shoved towards the bottom, for some reason.

    For a visual, go here:
    http://security.codegeass.us/

    Scroll down to where you see a list with checkmarks on it.

  2. #2
    Join Date
    Oct 2005
    Location
    Cambridgeshire, UK
    Posts
    191
    How about changing your CSS as follows:

    HTML Code:
    .checklist { list-style-type:none; padding:0; margin:0 }
    
    .checklist li
    {
    	background:url(../img/checkmark.jpg) no-repeat;
    	height:30px;
    	line-height:30px;
    	border:1px solid #353535;
    	padding:0;
    	padding-left:40px;
    	margin:0;
    }
    I've always found the list-style-image CSS attribute to be problematic if using anything larger than the standard bullet and therefore use the background instead.

    Hope that helps

  3. #3
    Join Date
    Apr 2010
    Posts
    5

    It worked!

    Holy **** it worked, it's just what I needed.

    Thanks so much. Now I can make my site now.

    May you be blessed with a thousand descendants.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles