homepage Welcome to WebmasterWorld Guest from 54.197.147.90
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / CSS
Forum Library, Charter, Moderator: open

CSS Forum

    
Control of menu items with images and CSS
toplisek




msg:4460315
 11:04 am on Jun 1, 2012 (gmt 0)

I like to set images without webfonts. How to set UL/LI settings if I like to use one image.

Sample:
#menu1 ul#menu_content1 li.selected a {
background-position: 0 -45px;
}
#menu1 ul#menu_content1 li a {
background: url("../images/mymenuitems.png") no-repeat scroll 0 0 transparent;
width: 55px;
}
#menu1 ul li:first-child a {
background-position: 0 -10px;
}

Is there some software or tool to help with position, selected, CSS, specially for the selected items?

I like to set in the correct way.

 

alt131




msg:4462978
 3:32 pm on Jun 8, 2012 (gmt 0)

Hi toplisek, do you mean a tool that will calculate the background-position for each sprite? If so, it would be very useful, but to my knowledge there isn't one. Basically you just have to do the maths yourself.

toplisek




msg:4463553
 11:32 am on Jun 10, 2012 (gmt 0)

Maybe some designers missed it. Ha,ha.

alt131




msg:4463559
 12:14 pm on Jun 10, 2012 (gmt 0)

yup, I'll bet no one thought of background-position when deciding to skip maths class :)

That said, I was just about to post when yours landed. Steve Soudar's spriteme [spriteme.org] makes sprites, but it also outputs the background position once it has done so.

Intended for converting non-sprited images rather than designing from the ground up, but maybe some help?

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / CSS
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved