Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

CSS Forum


You are currently viewing our CSS Forum as a guest. Please register to participate.
Login



Reply
Positioning List (li) Image?
Old 02-26-2009, 07:53 AM Positioning List (li) Image?
Ultra Talker

Posts: 316
Trades: 0
If my list item spans more than one line the list icon/bullet image is centered between the two line (see image attachment).

Is there a way to get the image to be inline with the first line list this:
  • Here is my line, when this goes to the new line the bullet stays in the same place.
Here is my CSS:
Code:
ul {
    list-style-type: none;
    padding-left: 0;
    margin-left: 0;
    margin-bottom: 0px;
}    

li {     background: url(images/bullet.jpg) left center no-repeat;
    margin-top: 0px;
    padding-left: 12px;
    margin-left: 1px;
}
Thanking you please.
Attached Images
File Type: jpg li.JPG (4.3 KB, 4 views)
Joe3000 is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 02-26-2009, 08:17 AM Re: Positioning List (li) Image?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Your style rule tells the image to be in the centre vertically, so that's where it will go.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-26-2009, 08:52 AM Re: Positioning List (li) Image?
Ultra Talker

Posts: 316
Trades: 0
Sorry, should've spotted that.

Do you know if its possible to have it top aligned but moved down a couple of pixels?
Joe3000 is offline
Reply With Quote
View Public Profile
 
Old 02-26-2009, 09:47 AM Re: Positioning List (li) Image?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Of course.

Simply use a pixel value for the vertical/horizontal position. You are not limited to only using the named positions.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-26-2009, 01:06 PM Re: Positioning List (li) Image?
Ultra Talker

Posts: 316
Trades: 0
Quote:
Originally Posted by chrishirst View Post
Of course.

Simply use a pixel value for the vertical/horizontal position. You are not limited to only using the named positions.
Don't suppose you could give me an example of what thay would look like?
Joe3000 is offline
Reply With Quote
View Public Profile
 
Old 02-26-2009, 02:07 PM Re: Positioning List (li) Image?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
Quote:
Originally Posted by Joe3000 View Post
Don't suppose you could give me an example of what thay would look like?
Just like any other pixel value

2px

http://www.w3schools.com/css/pr_background-position.asp
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-26-2009, 02:52 PM Re: Positioning List (li) Image?
Ultra Talker

Posts: 316
Trades: 0
Where do I put that though, where it doesnt move the list?
Joe3000 is offline
Reply With Quote
View Public Profile
 
Old 02-26-2009, 03:15 PM Re: Positioning List (li) Image?
chrishirst's Avatar
Missing! presumed drunk.

Posts: 41,517
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
in the background rule. Instead of - "center left" use - "2px left"
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
A foolish consistency is the hobgoblin of little minds
Thought for today:- I SEO the only industry where all the cowboys are Indians?
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 02-26-2009, 03:56 PM Re: Positioning List (li) Image?
Ultra Talker

Posts: 316
Trades: 0
Thanks a lot.
Joe3000 is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Positioning List (li) Image?
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.45401 seconds with 13 queries