1

My goal is to have something like this:

Link1 This text is a bit long <bullet point> Link2 This text is real short

I want to have the bullet point centered instead of the entire line of code itself. Here is my current code:

<center>
<div id="links">
<a href ="post.php">Post to Classifieds</a>
<span style="padding-left: 20px; padding-right: 20px;">&#9679;</span>
<a href="contact.php">Contact</a>
</div>
</center>

Post to Classifieds ● Contact

Which currently aligns the text at around the middle 's' in 'classifieds' instead of what I need, which is the bullet point centered. Does anyone know a solution?

Norse
  • 5,674
  • 16
  • 50
  • 86
  • don't really understand how you want to center it. Why don't you use the `
      ` `
    • ` elements?
    – Jake Feb 26 '12 at 07:02
  • I thought I explained it well enough in the original post. The way I'd like it centered is around the bullet point, so the bullet point is aligned in the middle of the page. – Norse Feb 26 '12 at 07:04
  • what do you want to center ? first text , second text or bullet point ? – N30 Feb 26 '12 at 07:04
  • @N30 The bullet point good sir – Norse Feb 26 '12 at 07:05
  • @user1093634 Sorry about that, please see my answer below. thanks. – Jake Feb 26 '12 at 12:11

4 Answers4

0

You mean to say something like this? http://jsfiddle.net/uday99/kFGmC/1/

uday
  • 8,544
  • 4
  • 30
  • 54
0

Maybe this is what you want?

http://jsfiddle.net/uday99/kFGmC/1/

Basically, just make the outer two elements the same width, then it will center around the bullet point as you wish.

F.P
  • 17,421
  • 34
  • 123
  • 189
0

EDITED: Or this one... http://jsfiddle.net/kFGmC/22/

the bullets will align because the first span is has same width. the entire line will center because the width of links on both sides are the same.

Jake
  • 11,273
  • 21
  • 90
  • 147
0

This should work..

http://jsfiddle.net/PUnzb/3/

following will help you figure out what i did.

https://stackoverflow.com/a/114549/210696

Community
  • 1
  • 1
N30
  • 3,463
  • 4
  • 34
  • 43