how to make script tag right align ?

Discussion in 'HTML & Website Design' started by tarjan, Aug 23, 2006.

  1. #1
    Hi all ,

    i have one problem regarding script tag ... i mean i m using <div> tag layout .... and in which i want to put content + google ad as content( some part ) in left align and beside the google ad ...

    how to do it ?
    
    <div align='left' > 
           some text  
           <div align='right'>
                <script>//google ad code </script>
           </div>
       </div>
    
    Code (markup):
     
    tarjan, Aug 23, 2006 IP
  2. kajsng

    kajsng Peon

    Messages:
    74
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    Try <div style="float:right">
     
    kajsng, Aug 23, 2006 IP
  3. rooneydavid

    rooneydavid Guest

    Messages:
    67
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #3
    You cant nest <div> tags with diffrent alignments. You should always in them cases use the CSS float: property.
     
    rooneydavid, Aug 23, 2006 IP
  4. tarjan

    tarjan Banned

    Messages:
    208
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Hi kajsng,

    i got the solution for this thanks for your advice ... here is the solution i do ...


    
    ///css class for div tag
    .adtag {
    	float: right;
    	text-align: right;
    	clear: none;
    }
    /////
    <div class="adtag" style="width:336px;margin:8px;"> 
    
    Code (markup):
    thanks ....

    :D
     
    tarjan, Aug 24, 2006 IP
  5. mjindustry

    mjindustry Peon

    Messages:
    24
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #5
    On a related note, anyone know how to take these and make them all be on one line and right justified? I have no clue how to do it but would love if someone could show me here.

    There are like 4 different items here. twitter, fb like, add this, and google +1. Some script and some not. As it is the +1 goes to an additional line under the rest...so I would like all 4 on one line and hopefully all to the right side of the page.

    {source}<div class="addthis_toolbox addthis_default_style "><a class="addthis_button_facebook_like" fb:like:layout="button_count"></a><a class="addthis_button_tweet"></a><a class="addthis_counter addthis_pill_style"></a></div><script type="text/javascript">var addthis_config = {"data_track_clickback":true,"data_track_addressbar":true};</script><script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=mjindustry"></script><!-- Place this tag where you want the +1 button to render -->
    
    <g:plusone size="tall" annotation="inline"></g:plusone>
    
    <!-- Place this render call where appropriate -->
    <script type="text/javascript">
      (function() {
        var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;
        po.src = 'https://apis.google.com/js/plusone.js';
        var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);
      })();
    Code (markup):

    Thanks for any help!
     
    mjindustry, Oct 9, 2011 IP
  6. woody allen

    woody allen Peon

    Messages:
    263
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Just make a point of adding Algin="left" or Align="right" inside the first table ... First off, you only use a left or right Align to get the text started.
     
    woody allen, Oct 12, 2011 IP