Webmaster Forum

Go Back   Webmaster Forum > Web Development > Coding Forum

Coding Forum Problems with your code? Discuss coding issues, including JavaScript, PHP & MySQL, HTML & CSS, Flash & ActionScript, and more.


Reply
 
LinkBack Thread Tools Display Modes
Old 03-18-2004, 10:28 AM   #1 (permalink)
Senior Member
 
Fruit & Veg's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 281
iTrader: 2 / 100%
Latest Blog:
Wikipedia

Fruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really nice
Vertical Aligning List Images with CSS

I'm using an image for a bulleted list with this code;

ul {list-style: disc url(tick.gif) inside;}

However the text and image aren't aligned properly. I've tried playing with the image but the fact is that I cannot get the image to sit below the line of the text. I tried adding 'vertical-align: middle' but that doesn't work.

Any ideas?
Fruit & Veg is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-18-2004, 05:43 PM   #2 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,468
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to behold
Send a message via MSN to LazyJim
add some transparent pixels to the top or bottom of the image?
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-19-2004, 08:22 AM   #3 (permalink)
Senior Member
 
Fruit & Veg's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 281
iTrader: 2 / 100%
Latest Blog:
Wikipedia

Fruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really niceFruit & Veg is just really nice
Yeah, I tried adjusting the image but the problem is that the image can't be placed below the line of the text.

Anway, I solved it by not using lists, just using an image with the style="vertical-align: middle" in the <img src> tag.

Probably not the best method, but unless anyone has anything better I'll stick with it.
Fruit & Veg is offline  
Add Post to del.icio.us
Reply With Quote
Old 03-19-2004, 09:12 AM   #4 (permalink)
Moderator
 
LazyJim's Avatar
 
Join Date: 10-13-03
Location: UK
Posts: 2,468
iTrader: 0 / 0%
Latest Blog:
None

LazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to beholdLazyJim is a splendid one to behold
Send a message via MSN to LazyJim
only one other idea, - if you can't move the bullet image down, move the list item text up!

on the <li>...
position: relative;
top: -10px;
left: 0px;

But some browsers put the list bullet inside the <li> and some outside, so probably best to do the positioning on a <span> inside the <li>
__________________

-LJ-

My advice is to look at each case individually, with an informed mind and an appropriately balanced and objective viewpoint.

Web Design and Development, Ipswich, UK.
My deviantArt
LazyJim is offline  
Add Post to del.icio.us
Reply With Quote
Go Back   Webmaster Forum > Web Development > Coding Forum

Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Aligning. Jerlene Coding Forum 2 07-09-2007 01:42 AM
aligning image to the top of the page chillami Coding Forum 4 12-30-2006 08:28 PM
Problem aligning list Grump Coding Forum 1 02-18-2005 12:46 AM
Don't know how to display list of images Greener Web Usability 3 06-21-2004 04:22 AM
[SOLVED] Aligning tables with CSS? Justin Coding Forum 2 01-21-2004 02:59 PM


Sponsor Links
Get exposure! Contextual Links V7N SEO Blog V7N Directory


All times are GMT -7. The time now is 08:31 PM.
© Copyright 2008 V7 Inc
Powered by vBulletin
Copyright © 2000-2009 Jelsoft Enterprises Limited.


Search Engine Optimization by vBSEO 3.3.0 ©2009, Crawlability, Inc.