Register

If this is your first visit, please click the Sign Up now button to begin the process of creating your account so you can begin posting on our forums! The Sign Up process will only take up about a minute of two of your time.

Page 1 of 2 1 2 LastLast
Results 1 to 10 of 12
  1. #1
    Member bil2k's Avatar
    Join Date
    Dec 2005
    Posts
    50
    Member #
    12214
    I have a <ul> within a div tag that I'd like to line up against the left side of the div. By default when you make a <ul> it offsets it some to the right. What do I need to do?

    I've tried making the padding-left and margin-left for #div ul negative but it has no effect.

  2.  

  3. #2
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    play with margin and padding of the ul and li
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  4. #3
    Member bil2k's Avatar
    Join Date
    Dec 2005
    Posts
    50
    Member #
    12214
    tried it already its not working....

  5. #4
    Senior Member igeek's Avatar
    Join Date
    Oct 2005
    Posts
    202
    Member #
    11644
    how about some code to look at.. or a screen shot..

  6. #5
    Member bil2k's Avatar
    Join Date
    Dec 2005
    Posts
    50
    Member #
    12214
    Code:
    <div id="ad1" class="ad">
    	<ul>
    	<li>Free Shipping</li>
    	<li>Free Artwork</li>
    	<li>Free Mold </li>
    	<li>Free Setup &amp; Design </li>
    	<li>Guaranteed Lowest Prices</li>
    	</ul>
    </div>
    Code:
    .ad {
    	background-color:#fffedf;
    	width:199px;
    	height:auto;
    	float:right;
    	border-right: 1px solid #eed85d;
    	border-left:1px solid #eed85d;
    }
    
    /* tried both padding-left and margin-left making 
    them negative for the following elements and they 
    don't budge. If I make it positive they go to the right no probmlem. */
    
    #ad1 ul {}
    #ad1 li {}
    edit: thought float:right might be doing it but taking it out didnt help

  7. #6
    Senior Member karinne's Avatar
    Join Date
    Dec 2003
    Location
    Aylmer QC Canada
    Posts
    1,607
    Member #
    4335
    Liked
    8 times
    did you try

    HTML Code:
    ul {
      margin: 5px;
      padding: 0;
    }
    
    ul li {
      margin: 5px;
      padding: 5px;
    }
    like i said earlier, play with the margin and padding of the ul and li
    [a web design portfolio - Currently NOT AVAILABLE for work | web design | Re-coding | PSD-to-HTML]
    I'm also on: virb - facebook - twitter - flickr - del.icio.us

  8. #7
    Senior Member igeek's Avatar
    Join Date
    Oct 2005
    Posts
    202
    Member #
    11644
    ok.. so the ul is to far to the right? am i understanding this correctly..

    have you tried using this...in the class.. if you want the ul more to the left?

    Code:
    text-indent:-10px;

  9. #8
    Member bil2k's Avatar
    Join Date
    Dec 2005
    Posts
    50
    Member #
    12214
    Quote Originally Posted by igeek
    ok.. so the ul is to far to the right? am i understanding this correctly..

    have you tried using this...in the class.. if you want the ul more to the left?

    Code:
    text-indent:-10px;
    That did the trick. Thanks igeek and everyone else who tried!

  10. #9
    Senior Member igeek's Avatar
    Join Date
    Oct 2005
    Posts
    202
    Member #
    11644
    no problem...bil2k.. how about some rep?

  11. #10
    Senior Member filburt1's Avatar
    Join Date
    Jul 2002
    Location
    Maryland, US
    Posts
    11,774
    Member #
    3
    Liked
    21 times
    What igeek means is to click the "Thumbs Up" button for the post that helped you. Rep == "reputation."

    http://www.webdesignforums.net/faq.p...utation_whatis (that's from memory)
    filburt1, Web Design Forums.net founder
    Site of the Month contest: submit your site or vote for the winner!


Page 1 of 2 1 2 LastLast

Remove Ads

Posting Permissions

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

Search tags for this page

ul margins

Click on a term to search for related topics.
All times are GMT -6. The time now is 04:58 PM.
Powered by vBulletin® Version 4.2.3
Copyright © 2019 vBulletin Solutions, Inc. All rights reserved.
vBulletin Skin By: PurevB.com