• Centre character in anchor

    From Andrew Poulos@21:1/5 to All on Fri Mar 13 12:18:25 2020
    I have this HTML

    <a href="foo.html">&#8630;</a>

    with this CSS

    a {
    box-sizing: border-box;
    font-size:28px;
    font-weight:bold;
    text-decoration: none;
    display:block;
    width:40px;
    height:40px;
    text-align:center;
    }

    Firefox displays the left curving arrow (&#8630;) vertically centred in
    the anchor. Whereas Chrome has it about 6 pixels too high.

    Is it the nature of the unicode character or is there something I can do
    to get it to centre vertically in all browsers?

    Andrew Poulos

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrew Poulos@21:1/5 to Andrew Poulos on Fri Mar 13 12:23:34 2020
    On 13/03/2020 12:18 pm, Andrew Poulos wrote:
    I have this HTML

    <a href="foo.html">&#8630;</a>

    with this CSS

    a {
      box-sizing: border-box;
      font-size:28px;
      font-weight:bold;
      text-decoration: none;
      display:block;
      width:40px;
      height:40px;
      text-align:center;
    }

    Firefox displays the left curving arrow (&#8630;) vertically centred in
    the anchor. Whereas Chrome has it about 6 pixels too high.

    Is it the nature of the unicode character or is there something I can do
    to get it to centre vertically in all browsers?

    Oh, I tried changing the CSS for the anchor to

    display:table-cell;
    vertical-align:middle;

    but still the text is too high in Chrome.

    Andrew Poulos

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Evertjan.@21:1/5 to Andrew Poulos on Fri Mar 13 09:53:04 2020
    Andrew Poulos <ap_prog@hotmail.com> wrote on 13 Mar 2020 in comp.infosystems.www.authoring.stylesheets:

    I have this HTML

    <a href="foo.html">&#8630;</a>

    with this CSS

    a {
    box-sizing: border-box;
    font-size:28px;
    font-weight:bold;
    text-decoration: none;
    display:block;
    width:40px;
    height:40px;
    text-align:center;
    }

    Firefox displays the left curving arrow (&#8630;) vertically centred in
    the anchor. Whereas Chrome has it about 6 pixels too high.

    Is it the nature of the unicode character or is there something I can do
    to get it to centre vertically in all browsers?

    Andrew Poulos

    Add something like:

    line-height: 46px;

    and play with font-family



    --
    Evertjan.
    The Netherlands.
    (Please change the x'es to dots in my emailaddress)

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jonathan N. Little@21:1/5 to Andrew Poulos on Fri Mar 13 10:50:27 2020
    Andrew Poulos wrote:
    I have this HTML

    <a href="foo.html">&#8630;</a>

    with this CSS

    a {
      box-sizing: border-box;
      font-size:28px;
      font-weight:bold;
      text-decoration: none;
      display:block;
      width:40px;
      height:40px;
      text-align:center;
    }

    Firefox displays the left curving arrow (&#8630;) vertically centred in
    the anchor. Whereas Chrome has it about 6 pixels too high.

    Is it the nature of the unicode character or is there something I can do
    to get it to centre vertically in all browsers?


    If you remove all styling and compare you will notice that the character
    used by each browser looks different. Chrome is a flatter curve. Firefox
    is more of a semicircle. Edge looks like a upside-down U. It is just
    going to look slightly different depending on browse unless you use an
    image or a custom SVG.


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?B?8J+YiSBHb29kIEd1eSDwn5iJ?@21:1/5 to Andrew Poulos on Fri Mar 13 17:18:00 2020
    This is a multi-part message in MIME format.
    On 13/03/2020 01:18, Andrew Poulos wrote:
    I have this HTML

    <a href="foo.html">&#8630;</a>

    with this CSS

    a {
    box-sizing: border-box;
    font-size:28px;
    font-weight:bold;
    text-decoration: none;
    display:block;
    width:40px;
    height:40px;
    text-align:center;
    }

    Firefox displays the left curving arrow (&#8630;) vertically centred
    in the anchor. Whereas Chrome has it about 6 pixels too high.

    Is it the nature of the unicode character or is there something I can
    do to get it to centre vertically in all browsers?

    Andrew Poulos


    Use this css:

    a {
    box-sizing: border-box;
    font-size: 28px;
    font-weight: bold;
    text-decoration: none;
    width: 100px;
    height: 100px;
    text-align: center;
    border: 2px solid red;
    display: flex;
    align-items: center;
    justify-content: center;
    }


    --
    With over 1.2 billion devices now running Windows 10, customer
    satisfaction is higher than any previous version of windows.

    <html>
    <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
    </head>
    <body bgcolor="#FFFFE0" text="#006600">
    <div class="moz-cite-prefix">On 13/03/2020 01:18, Andrew Poulos
    wrote:<br>
    </div>
    <blockquote
    cite="mid:ZLidnUBfr6T5QvfDnZ2dnUU7-cfNnZ2d@westnet.com.au"
    type="cite">I have this HTML
    <br>
    <br>
    &lt;a href="foo.html"&gt;&amp;#8630;&lt;/a&gt;
    <br>
    <br>
    with this CSS
    <br>
    <br>
    a {
    <br>
      box-sizing: border-box;
    <br>
      font-size:28px;
    <br>
      font-weight:bold;
    <br>
      text-decoration: none;
    <br>
      display:block;
    <br>
      width:40px;
    <br>
      height:40px;
    <br>
      text-align:center;
    <br>
    }
    <br>
    <br>
    Firefox displays the left curving arrow (&amp;#8630;) vertically
    centred in the anchor. Whereas Chrome has it about 6 pixels too
    high.
    <br>
    <br>
    Is it the nature of the unicode character or is there something I
    can do to get it to centre vertically in all browsers?
    <br>
    <br>
    Andrew Poulos
    <br>
    </blockquote>
    <br>
    <br>
    Use this css:<br>
    <br>
    <blockquote type="cite">
    <div style="color: #d4d4d4;background-color: #1e1e1e;font-family: Consolas, 'Courier New', monospace;font-weight: normal;font-size: 14px;line-height: 19px;white-space: pre;"><div><span style="color: #d4d4d4;"> </span><span style="color: #d7ba7d;">
    a</span><span style="color: #d4d4d4;"> {</span></div><div><span style="color: #d4d4d4;">            </span><span style="color: #9cdcfe;">box-sizing</span><span style="color: #d4d4d4;">: border-box;</span></div><div><span style="color: #
    d4d4d4;">            </span><span style="color: #9cdcfe;">font-size</span><span style="color: #d4d4d4;">: </span><span style="color: #b5cea8;">28px</span><span style="color: #d4d4d4;">;</span></div><div><span style="color: #d4d4d4;">    Â
     Â Â Â Â Â Â Â </span><span style="color: #9cdcfe;">font-weight</span><span style="color: #d4d4d4;">: bold;</span></div><div><span style="color: #d4d4d4;">            </span><span style="color: #9cdcfe;">text-decoration</span
    <span style="color: #d4d4d4;">: none;</span></div><div><span style="color: #d4d4d4;">            </span><span style="color: #9cdcfe;">width</span><span style="color: #d4d4d4;">: </span><span style="color: #b5cea8;">100px</span><span style="
    color: #d4d4d4;">;</span></div><div><span style="color: #d4d4d4;">            </span><span style="color: #9cdcfe;">height</span><span style="color: #d4d4d4;">: </span><span style="color: #b5cea8;">100px</span><span style="color: #d4d4d4;">;</
    span></div><div><span style="color: #d4d4d4;">            </span><span style="color: #9cdcfe;">text-align</span><span style="color: #d4d4d4;">: center;</span></div><div><span style="color: #d4d4d4;">            </span><span style=
    "color: #9cdcfe;">border</span><span style="color: #d4d4d4;">: </span><span style="color: #b5cea8;">2px</span><span style="color: #d4d4d4;"> solid red;</span></div><div><span style="color: #d4d4d4;">            </span>
    <span style="color: #9cdcfe;">display</span><span style="color: #d4d4d4;">: flex;</span></div><div><span style="color: #d4d4d4;">            </span><span style="color: #9cdcfe;">align-items</span><span style="color: #d4d4d4;">: center;</
    span></div><div><span style="color: #d4d4d4;">            </span><span style="color: #9cdcfe;">justify-content</span><span style="color: #d4d4d4;">: center;</span></div><div><span style="color: #d4d4d4;">        }</span></div></div>
    </blockquote>
    <br>
    <br>
    <div class="moz-signature">-- <br>
    <div class="moz-signature">
    <div style="width: 340px;height: 290px; background-color: blue;
    color: yellow;font-weight: bolder; font-size:200%; text-align:
    center; margin: 30px 5px 30px 5px;">With over 1.2 billion
    devices now running Windows 10, customer satisfaction is
    higher than any previous version of windows.</div>
    </div>
    </div>
    </body>
    </html>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From James Kirk@21:1/5 to Andrew Poulos on Fri Mar 13 20:05:51 2020
    In Message: <R9Gdnbc6L_cKfffDnZ2dnUU7-cGdnZ2d@westnet.com.au>
    Andrew Poulos <ap_prog@hotmail.com> wrote:

    On 13/03/2020 12:18 pm, Andrew Poulos wrote:

    I have this HTML

    <a href="foo.html">&#8630;</a>

    [snip]

    Firefox displays the left curving arrow (&#8630;) vertically
    centred in the anchor. Whereas Chrome has it about 6 pixels too
    high.

    Is it the nature of the unicode character or is there something I
    can do to get it to centre vertically in all browsers?

    Oh, I tried changing the CSS for the anchor to

    display:table-cell;
    vertical-align:middle;

    but still the text is too high in Chrome.

    Evertjan & Jonathan pointed out font.

    Select a font-family that contains ANTICLOCKWISE TOP SEMICIRCLE ARROW
    entity: &#8630;. Do not leave it up to the ua.

    Edge ⇒ Segoe UI Emoji
    Vivaldi ⇒ Segoe UI Symbol
    Chrome ⇒ Cambria Math
    Firefox ⇒ Segoe UI Symbol

    I think I would use display inline-flex or flex … somewhat like Guy suggested.

    inline-flex example with a few fonts and a background grid.

    https://codepen.io/noneyainvalid/full/wvamXVG

    --
    James Kirk

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Andrew Poulos@21:1/5 to James Kirk on Sat Mar 14 13:55:58 2020
    On 14/03/2020 11:05 am, James Kirk wrote:
    In Message: <R9Gdnbc6L_cKfffDnZ2dnUU7-cGdnZ2d@westnet.com.au>
    Andrew Poulos <ap_prog@hotmail.com> wrote:

    On 13/03/2020 12:18 pm, Andrew Poulos wrote:

    I have this HTML

    <a href="foo.html">&#8630;</a>

    [snip]

    Firefox displays the left curving arrow (&#8630;) vertically
    centred in the anchor. Whereas Chrome has it about 6 pixels too
    high.

    Is it the nature of the unicode character or is there something I
    can do to get it to centre vertically in all browsers?

    Oh, I tried changing the CSS for the anchor to

    display:table-cell;
    vertical-align:middle;

    but still the text is too high in Chrome.

    Evertjan & Jonathan pointed out font.

    Select a font-family that contains ANTICLOCKWISE TOP SEMICIRCLE ARROW
    entity: &#8630;. Do not leave it up to the ua.

    Edge ⇒ Segoe UI Emoji
    Vivaldi ⇒ Segoe UI Symbol
    Chrome ⇒ Cambria Math
    Firefox ⇒ Segoe UI Symbol

    I tried all the suggested solutions and Firefox has the characters down
    towards the bottom of the anchor. I think it's a quirk in the unicode
    character as other characters I tested seem fine.

    I just going to need to make images of the characters and use those :-(

    Andrew Poulos

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Jonathan N. Little@21:1/5 to Andrew Poulos on Fri Mar 20 15:31:17 2020
    Andrew Poulos wrote:
    On 14/03/2020 11:05 am, James Kirk wrote:
    In Message: <R9Gdnbc6L_cKfffDnZ2dnUU7-cGdnZ2d@westnet.com.au>
    Andrew Poulos <ap_prog@hotmail.com> wrote:

    On 13/03/2020 12:18 pm, Andrew Poulos wrote:

    I have this HTML

    <a href="foo.html">&#8630;</a>

    [snip]

    Firefox displays the left curving arrow (&#8630;) vertically
    centred in the anchor. Whereas Chrome has it about 6 pixels too
    high.

    Is it the nature of the unicode character or is there something I
    can do to get it to centre vertically in all browsers?

    Oh, I tried changing the CSS for the anchor to

    display:table-cell;
    vertical-align:middle;

    but still the text is too high in Chrome.

    Evertjan & Jonathan pointed out font.

    Select a font-family that contains ANTICLOCKWISE TOP SEMICIRCLE ARROW
    entity: &#8630;. Do not leave it up to the ua.

         Edge ⇒ Segoe UI Emoji
      Vivaldi ⇒ Segoe UI Symbol
       Chrome ⇒ Cambria Math
      Firefox ⇒ Segoe UI Symbol

    I tried all the suggested solutions and Firefox has the characters down towards the bottom of the anchor. I think it's a quirk in the unicode character as other characters I tested seem fine.

    I just going to need to make images of the characters and use those :-(

    If you want *absolute* uniformity that is your only solution. I would
    make|use an SVG though for best results, both byte-wise and display-wise.


    --
    Take care,

    Jonathan
    -------------------
    LITTLE WORKS STUDIO
    http://www.LittleWorksStudio.com

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)