Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you use a <a href="http://en.wikipedia.org/wiki/Monospaced_font" rel="nofollow">monospaced font</a> then you can use <code>position:relative;</code> and move your row of text, since every letter and space <code></code> has the same size (<a href="http://jsfiddle.net/SA7T4/1/" rel="nofollow">demo</a>). You can achieve a similar result on fonts without fixed-width, but the offset (<code>left:;</code>) is a little bit harder to calculate, as almost every letter occupies another amount of horizontal space. </p> <pre><code>&lt;nav class="letter monospace"&gt; &lt;div&gt;A B C D E F G H I J&lt;/div&gt; &lt;!-- monospaced font demo --&gt; &lt;/nav&gt; &lt;nav class="letter"&gt; &lt;div&gt;A B C D E F G H I J&lt;/div&gt; &lt;!-- standard browser font demo --&gt; &lt;/nav&gt; &lt;div id="leftmiddle"&gt; &lt;/div&gt; &lt;div id="rightmiddle"&gt; &lt;/div&gt; </code></pre> <pre><code>nav.letter{ font-size:2em; text-align:center; } nav.letter &gt; div{ /* standard browser font */ position:relative; left:1.05em; /* you have to calculate the horizontal shift yourself based on the font you're using */ } nav.letter.monospace{ font-family:monospace; } nav.letter.monospace &gt; div{ /* monospaced font */ position:relative; left:1.75em; /* to center the row around 'E' change to 0.75em, for C to 2.75em... */ } nav ~ div{ width:49%; min-height:200px; height: 80%; } #leftmiddle{ float:left; border-right:1px solid;} #rightmiddle{ float:right; border-left:1px solid;} </code></pre> <p><a href="http://jsfiddle.net/SA7T4/3/" rel="nofollow">HTML4 demo, working in IE7-9, FF10, Opera, Chrome</a>.</p> <p><strong>UPDATE</strong>: See this alternative <a href="http://jsfiddle.net/SA7T4/6/embedded/result/" rel="nofollow">demo</a> (working in IE7-9, FF10, Opera, Chrome): </p> <pre><code>&lt;div class="letter"&gt; &lt;div class="wrapper"&gt; &lt;div class="before"&gt; A B C &lt;/div&gt; D &lt;div class="after"&gt; E F G H I J &lt;/div&gt; &lt;/div&gt; &lt;/div&gt; </code></pre> <pre><code>.letter{ text-align:center; overflow:hidden; } .letter &gt; .wrapper{ width:1em; margin:auto; position:relative; } .letter &gt; .wrapper &gt; .before{ position:absolute; right:125%; text-align:right; width:10em; } .letter &gt; .wrapper &gt; .after{ position:absolute; text-align:left; top:0; left:125%; width:20em; } </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload