#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    2
    Rep Power
    0

    Add space in line of text


    I need to add extra space in a line of text.
    I could use a spacer gif - or multiple   but I feel I should be able to do this with css.

    I've tried using a span - which stays on the line but margins, box width, etc dont work;

    I've tried using a <div> with display: inline
    and it works except the div starts on a new line so thats no good either.

    I want a solution thats SIMPLE and ELEGANT and cross-browser compatible.

    Why is it SO HARD?
  2. #2
  3. CSS & JS/DOM Adept
    Devshed Supreme Being (6500+ posts)

    Join Date
    Jul 2004
    Location
    USA (verifiably)
    Posts
    20,128
    Rep Power
    4304
    Welcome to DevShed Forums, john errington.

    Please show us your code and what you want it to look like.

    The width and height properties do not apply to (non-replaced) inline elements.

    Why is it SO HARD?
    *shrugs* Most things are hard until you know how.
    Spreading knowledge, one newbie at a time.

    Check out my blog. | Learn CSS. | PHP includes | X/HTML Validator | CSS validator | Common CSS Mistakes | Common JS Mistakes

    Remember people spend most of their time on other people's sites (so don't violate web design conventions).
  4. #3
  5. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Aug 2013
    Posts
    2
    Rep Power
    0

    thanks for the hint


    [code]
    <p>text here<span class="space"></span>more here
    works but only if I use display: inline-block;

    <style>
    .space{display: inline-block;
    width: 50px;
    }</style>

    SORTED!

IMN logo majestic logo threadwatch logo seochat tools logo