SitePoint Sponsor

User Tag List

Results 1 to 7 of 7
  1. #1
    SitePoint Evangelist Pixelateur's Avatar
    Join Date
    Feb 2006
    Location
    Hamburg, Germany
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Question How to embed code into paragraphs

    Hello,

    I am having some difficulties with <code> tags embedded into paragraphs: Link to website

    It seems that some space gets added to it at the bottom, so that lines with bits of code in it become higher than others. That looks ugly!

    What am I missing here? Can anybody help?

  2. #2
    Life is not a malfunction gold trophysilver trophybronze trophy
    TechnoBear's Avatar
    Join Date
    Jun 2011
    Location
    Argyll, Scotland
    Posts
    6,380
    Mentioned
    269 Post(s)
    Tagged
    5 Thread(s)
    In which browser are you seeing the problem? It looks fine to me in Firefox7 and Chromium on Linux.

  3. #3
    SitePoint Evangelist Pixelateur's Avatar
    Join Date
    Feb 2006
    Location
    Hamburg, Germany
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    In webkit browsers, i.e. Chrome and Safari.

  4. #4
    SitePoint Member
    Join Date
    Nov 2011
    Posts
    14
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    It looks also fine in Mozilla , IE6 7 8 9 ,Chrome Opera ans Safari . (Windows 7)
    maybe you could set an inline display to code ?

  5. #5
    Sploghm bronze trophy Victorinox's Avatar
    Join Date
    Nov 2008
    Posts
    749
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    I can see a slight difference in Safari. Try changing the line-height in the font declaration of #text article code from 25px to 100%.

  6. #6
    It's all Geek to me silver trophybronze trophy
    ralph.m's Avatar
    Join Date
    Mar 2009
    Location
    Melbourne, AU
    Posts
    24,301
    Mentioned
    460 Post(s)
    Tagged
    8 Thread(s)
    I see a slight gap in Firefox and Safari (didn't test in others). I'd say remove the line height for the code altogether. That fixes it for me.

  7. #7
    SitePoint Evangelist Pixelateur's Avatar
    Join Date
    Feb 2006
    Location
    Hamburg, Germany
    Posts
    593
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Wow, thank you! You guys are great. In fact the 100% line-height did the trick. Works like a charm now. You guys really saved me a couple of hours work.


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •