1

I have got a little problem with a spacing. I want to have spacing less than 1 pixel. Here is my html

<div id="head">
     <h1>Mira's</h1>
    <br>
     <h2>Koding place</h2>
</div>

and here is the CSS

@font-face {
    font-family: Museo;
    src: url("fonts/Museo300-Regular.otf") format("opentype");
}
body {
    background-color: black;
}
h1 {
    text-align: center;
    margin: 0 auto;
    font-family:'Museo', 'Lucida Console', Courier;
    font-size: 7em;
    text-transform: uppercase;
    color: #fff;
    text-shadow: 0 0 10px #fff, 0 0 20px #fff, 0 0 30px #fff, 0 0 40px #029408, 0 0 70px #029408, 0 0 80px #029408, 0 0 100px #029408, 0 0 150px #029408;
}
h2 {
    font-size: 1.65em;
    text-align: center;
    font-family:'Museo', 'Lucida Console', Courier;
    color: #fff;
    margin-top: -1.65em;
    margin-left: 0.13em;
    letter-spacing: 0.5px;
}

Problem is that it's not letter spacing less than one px, is there any hack to make it less than one px?

Here is jsfiddle with it http://jsfiddle.net/3np3y/

Also dont mind that some things in CSS are px and some are em. I will retype everything to em soon.

Kyrbi
  • 2,212
  • 7
  • 25
  • 42
  • Maybe this can help - http://stackoverflow.com/questions/7811225/is-there-a-way-to-make-css-letter-spacing-0-5-px. – vujke Mar 23 '13 at 19:49

1 Answers1

2

Letter spacing can have negative value, so try that :)

I.E. letter-spacing: -4px;

Miljan Puzović
  • 5,840
  • 1
  • 24
  • 30
  • 2
    Maybe my English is bad so I have not undestand what OP wants, but he asked for letter spacing less than one px? – Miljan Puzović Mar 23 '13 at 19:47
  • 1
    Why did your answer got downvotes? It seems working in my code http://jsfiddle.net/3np3y/1/ . Is there anything bad on making 'letter-spacing' negative? – Kyrbi Mar 23 '13 at 19:47
  • 2
    If this is an accepted answer, then the question meant something very different from what it says. – Jukka K. Korpela Mar 23 '13 at 20:10
  • Well -8px is lesser than one pixel. So? – Kyrbi Mar 23 '13 at 20:14
  • From question I figure out that OP doesn't know about negative letter spacing, and he tryied to get value between 0 and 1 px. So I've pointed out that letter spacing can be negative also. And -4<1, so... :) – Miljan Puzović Mar 23 '13 at 20:17
  • 2
    Keep in mind that negative values are often used with `margin` and the results are predictable among browsers. There is some discussion (search 'css negative letter spacing') about the topic on various forums and blogs. Keep in mind that some browsers handle letter-spacing differently. For example, see the discussion by: http://blarg.aaronpropst.com/IE-CSS-does-letter-spacing-stupidly – Marc Audet Mar 23 '13 at 21:09