0
Welcome Guest! Login
0 items Join Now

ROCKETTHEME IS CLOSING ON JUNE 30, 2025. As a thank-you to our community, enjoy 50% off all themes with the promo code THANKYOU before we shut down. Read our Farewell Blog Post for more details.

Insert a space between icon and text

    • sfutterer's Avatar
    • sfutterer
    • Jr. Rocketeer
    • Posts: 24
    • Thanks: 0

    Insert a space between icon and text

    Posted 16 years 9 months ago
    • I'm having trouble adding a simple white space between the icon and text in this code. Any help is appreciated:
      $html .= '<img border="0" src="'.$doc->getPath('icon', 1, '16x16').'" alt="file icon" />';
  • Re: Insert a space between icon and text

    Posted 16 years 9 months ago
    • Which icons are you referring to?
    • James Spencer / Developer & Support / Hull, UK
    • sfutterer's Avatar
    • sfutterer
    • Jr. Rocketeer
    • Posts: 24
    • Thanks: 0

    Re: Insert a space between icon and text

    Posted 16 years 9 months ago
    • These are inside a module. In this case it happens to be a docman module

      This is what I have been trying:
      &nbsp; &nbsp; &nbsp; &nbsp; if ($show_icon)
      &nbsp; &nbsp; &nbsp; &nbsp;      $html .= '<img border="0"&nbsp; src="'.$doc->getPath('icon', 1, '16x16').'" alt="file icon" />';
      (i think the space goes here, but &nsbp; breaks the page)
      &nbsp; &nbsp; &nbsp; &nbsp; $html .= $doc->getData('dmname');
  • Re: Insert a space between icon and text

    Posted 16 years 9 months ago
    • Try this:
      if ($show_icon)
      $html .= '<img border="0" src="'.$doc->getPath('icon', 1, '16x16').'" alt="file icon" />';
      <br/>
      $html .= $doc->getData('dmname');
    • sfutterer's Avatar
    • sfutterer
    • Jr. Rocketeer
    • Posts: 24
    • Thanks: 0

    Re: Insert a space between icon and text

    Posted 16 years 9 months ago
    • &nsbp and <br/> both break the page. Image attached
    • sfutterer's Avatar
    • sfutterer
    • Jr. Rocketeer
    • Posts: 24
    • Thanks: 0

    Re: Insert a space between icon and text

    Posted 16 years 9 months ago
    • Got it - I think....
      if ($show_icon)
      &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;  $html .= '<img border="0"&nbsp; src="'.$doc->getPath('icon', 1, '16x16').'" alt="file icon" />';
                     $html .= '&nbsp; ';
      &nbsp; &nbsp; &nbsp;           $html .= $doc->getData('dmname');

Time to create page: 0.080 seconds