1

I've noticed that if I have two links :

<a href="#">Text</a>
<a href="#">Text</a>

They are not joined in the browser, looks like there is a space between them.

But if I wrote them in one line :

<a href="#">Text</a><a href="#">Text</a>

there is no space. Is there a way to delete that space? Or I need to write all links (or better, all inline elements) in one line?

markzzz
  • 47,390
  • 120
  • 299
  • 507

1 Answers1

1

You can use word-spacing write like this:

a
{
    display:inline;
    background-color:red;
    word-spacing:1em
}
body{word-spacing:-1em}

Check this http://jsfiddle.net/eAteH/2/

There other way also like font-size:0 check this Strange margin on `display:inline-block`-elements

Community
  • 1
  • 1
sandeep
  • 91,313
  • 23
  • 137
  • 155
  • uhm yeah, but I don't like put font-size:0 on body : this means I need to set it on all elements... – markzzz Apr 16 '12 at 13:09
  • 1
    as dennisg said you can define to anchor parent element. Like this http://jsfiddle.net/eAteH/5/ – sandeep Apr 16 '12 at 13:11