Solved

CSS How to center bullet image horizontally

Posted on 2013-01-15
6
489 Views
Last Modified: 2013-01-30
Please visit www.mwebdev.com/ls.html. Take a look at the menu, and the blue/red stars between the menu items.

1.

How can I center the star images between each of the menu links using CSS?

2.

How can I add CSS to add another start to the right of the last menu link (Contact)?

Thanks in advance!
0
Comment
Question by:isaacr25
  • 3
  • 2
6 Comments
 
LVL 7

Accepted Solution

by:
wdfdo1986 earned 350 total points
ID: 38781216
This is done using <ul> and <li>
What you could do to align stars center between links, is make the width vary, make a fixed margin. But for me the way it is better.
you can add another li tag to add a menu link inside <ul id="main-menu">

Hope it helps
0
 

Author Comment

by:isaacr25
ID: 38781237
Can you elaborate a bit on the last suggestion (adding another li tag)... More guidance would be appreciated.
0
 
LVL 5

Assisted Solution

by:Neil_Bradley
Neil_Bradley earned 150 total points
ID: 38781271
Rather than add another li tag to the end (to get your last star) you could simply add the star to the ul tag that contains the menu. The star would be positioned to the far right.. So giving you your start at the end..

Aggree with previous post. You can control the position of the stars by adding a fixed margin to one side of your li.
Cheers,
N
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 7

Assisted Solution

by:wdfdo1986
wdfdo1986 earned 350 total points
ID: 38781308
Search for <ul id="main-menu"> in the html and find the ul element.
you will find list of li tags there
add another
0
 

Author Comment

by:isaacr25
ID: 38781314
I tried adding a fixed margin to the li's. I had to apply a negative margin to get the horizontal spaces to even out. I'm fine with this.

However, I need to center the entire menu horizontally (it's floating to the left currently.

Also, what tags would I apply to get the last star on the right?
0
 
LVL 7

Assisted Solution

by:wdfdo1986
wdfdo1986 earned 350 total points
ID: 38781321
To align the whole thing add align center to the class "main-menu"
Check these
http://www.w3schools.com/css/css_align.asp
http://www.maxdesign.com.au/articles/center/
0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
JavaScript has plenty of pieces of code people often just copy/paste from somewhere but never quite fully understand. Self-Executing functions are just one good example that I'll try to demystify here.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now