SitePoint Sponsor

User Tag List

Results 1 to 3 of 3
  1. #1
    SitePoint Addict
    Join Date
    Dec 2009
    Posts
    301
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    margin-left not working

    I have a bold text , which I want to shift to right ...but this seems not working.


    tried with ...
    <strong ><span margin-left:100px">Territory Tab</span></strong>

    and also ...
    <span margin-left:100px"><strong>Territory Tab</strong></span>


    None working .

    please help how do I do it ?

  2. #2
    SitePoint Zealot imouto's Avatar
    Join Date
    Sep 2004
    Location
    Gotham
    Posts
    184
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Post

    Quote Originally Posted by windowsxp View Post
    I have a bold text , which I want to shift to right ...but this seems not working.


    tried with ...
    <strong ><span margin-left:100px">Territory Tab</span></strong>

    and also ...
    <span margin-left:100px"><strong>Territory Tab</strong></span>


    None working .

    please help how do I do it ?
    Your inline style is written incorrectly. It should be:

    Code:
    <span style="margin-left: 100px;">Territory Tab</span>
    Sitepoint Reference: http://reference.sitepoint.com/css/linkingcss

  3. #3
    billycundiff{float:left;} silver trophybronze trophy RyanReese's Avatar
    Join Date
    Oct 2008
    Location
    Whiteford, Maryland, United States
    Posts
    13,564
    Mentioned
    6 Post(s)
    Tagged
    0 Thread(s)
    Hi, if you want a value like that, perhaps you would be better off setting the span to float:left; or setting the parent to text-align:right;?

    But as the poster above mentioned you need to include the style attribute, so style="margin-left:100px;"
    Twitter-@Ryan_Reese09
    http://www.ryanreese.us -Always looking for web design/development 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
  •