1. Advertising
    y u no do it?

    Advertising (learn more)

    Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

    Starts at just $1 per CPM or $0.10 per CPC.

Problem with <ALIGN> Code

Discussion in 'HTML & Website Design' started by master-yoda, Dec 15, 2010.

  1. #1
    I am trying to add the 'ShareThis' button to my website. It is pre-set to be on the left side of the page but I want it on the right side. I have added the <ALIGN=Right> to the code but it still goes to the left.

    Have I added the wrong code?

    <ALIGN=Right><span class="st_sharethis_button" displayText="ShareThis"></span>
    <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher:'72bea167-5870-4612-b333-2c9a981074b2' offsetRight:'150'});</script>
     
    master-yoda, Dec 15, 2010 IP
  2. wittenvdp

    wittenvdp Peon

    Messages:
    40
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    The <ALIGN>-tag does not exist... Use it in a <DIV>-tag instead, like this:

    <div width="100%" align="right">
    <span class="st_sharethis_button" displayText="ShareThis"></span>
    <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher:'72bea167-5870-4612-b333-2c9a981074b2' offsetRight:'150'});</script>
    </div>
     
    wittenvdp, Dec 15, 2010 IP
  3. master-yoda

    master-yoda Well-Known Member

    Messages:
    1,246
    Likes Received:
    15
    Best Answers:
    1
    Trophy Points:
    138
    #3
    Thanks for your help as this has been bugging me most of the morning!

    I didnt know that the <ALIGN> tag was not used anymore.
     
    master-yoda, Dec 15, 2010 IP
  4. karthimx

    karthimx Prominent Member

    Messages:
    4,959
    Likes Received:
    127
    Best Answers:
    2
    Trophy Points:
    340
    #4
    there are two ways one you can use in the div tag

    eg: <div align="right">

    other way is you can use in style

    <div style=" float: right">
     
    karthimx, Dec 15, 2010 IP
  5. CSM

    CSM Active Member

    Messages:
    1,047
    Likes Received:
    25
    Best Answers:
    0
    Trophy Points:
    55
    #5
    
    <div align="right">
    
    Code (markup):
    is pretty bad code, tbh.

    <align> tag never existed!
     
    CSM, Dec 15, 2010 IP
  6. RaPeRbOy

    RaPeRbOy Active Member

    Messages:
    425
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    90
    #6
    You can also make it like this:

    <p style="text-align:right;">
    <span class="st_sharethis_button" displayText="ShareThis"></span>
    <script type="text/javascript" src="http://w.sharethis.com/button/buttons.js"></script><script type="text/javascript">stLight.options({publisher:'72bea167-5870-4612-b333-2c9a981074b2' offsetRight:'150'});</script>
    </p>
     
    RaPeRbOy, Dec 15, 2010 IP