how to put links on right and left side of page

Discussion in 'Scripts, 3rd Party Apps, and Programming' started by sanso_9970, Aug 18, 2011.

  1. sanso_9970

    sanso_9970 New Member

    Messages:
    13
    Likes Received:
    0
    Trophy Points:
    0
    i just install a php web directory and i like to put some links to left and right of page but i dont now how? i do not know much about php?
    thanks
    http://nespressocoffee.net/
     
  2. gdebojyoti.mail96

    gdebojyoti.mail96 Member

    Messages:
    89
    Likes Received:
    0
    Trophy Points:
    6
    Using CSS, create 2 columns in the left and right sections of your page (also known as left and right 'sidebars'). Put your links in those sidebars.

    Hope that helps. :)
     
  3. mbengi.bongi83

    mbengi.bongi83 New Member

    Messages:
    8
    Likes Received:
    0
    Trophy Points:
    0
    My approach would be as gdebojyoti.mail96 says, but I would put them in a "wrapper":

    CSS:

    Code:
    #wrapper {width: 100%; margin: auto;}
    #left { width: 50%; float: left;}
    #right { width: 50%; float: right}
    HTML:

    Code:
    <div id="wrapper">
    <div id="left">
    left links go here
    </div>
    <div id="right">
    right links go here>
    </div>
    </div>
    Obviously you can add formatting with other CSS tags etc

    Hope that helps. :)
     
  4. misson

    misson Community Paragon Community Support

    Messages:
    2,572
    Likes Received:
    72
    Trophy Points:
    48
  5. mpldev

    mpldev New Member

    Messages:
    4
    Likes Received:
    0
    Trophy Points:
    0
    Hi.

    I usually create a table with three columns in one row :
    <table width="100%">
    <tr>
    <td width="20%">Left Side</td>
    <td>Middle</td>
    <td width="20%">Right Side</td>
    </tr>
    </table>

    This code don't need css or php, just html.

    I hope this could help you.

    Bye.

    Greg.
     
  6. misson

    misson Community Paragon Community Support

    Messages:
    2,572
    Likes Received:
    72
    Trophy Points:
    48
    1999 called, it wants... you know the rest. Don't use tables for layout.

    Please use
    PHP:
    , [html] or [codetags (as appropriateto separate and format code.
     
    Last edited: Sep 1, 2011
  7. radiogrooves81

    radiogrooves81 New Member

    Messages:
    42
    Likes Received:
    0
    Trophy Points:
    0
    Left:

    Code:
    <!-- Header left begin-->
       <div style = "text-align:left; float:left">
          <b>Links:</b>
       </div>
    <!-- Header left end-->
     
    <!-- Links left begin-->
       <div style = "clear: left; float: left; text-align: left;">
          <br />
          <a href = "http://www.yourdomain.com">C++ Topics</a>
          <br />
          <a href = "http://www.yourdomain.com">JAVA Topics</a>
          <br />
          <a href = "http://www.yourdomain.com">BINARY Topics</a>
       </div>
    <!-- Links left end-->
    
    Right:

    Code:
    <!-- Header right begin-->
       <div style = "text-align:right; float:right">
          <b>Links:</b>
       </div>
    <!-- Header right end-->
     
    <!-- Links Right begin-->
       <div style = "clear: right; float: right; text-align: right;">
          <br />
          <a href = "http://www.yourdomain.com">C++ Topics</a>
          <br />
          <a href = "http://www.yourdomain.com">JAVA Topics</a>
          <br />
          <a href = "http://www.yourdomain.com">BINARY Topics</a>
       </div>
    <!-- Links right end-->
     
     
    
     
    Last edited: Sep 1, 2011
  8. bsha100

    bsha100 New Member

    Messages:
    3
    Likes Received:
    0
    Trophy Points:
    0
    You can also echo html in PHP, or add PHP to HTML.

    to echo html just add
    Code:
    echo '<p>HTML within PHP</p>
    or to add php within html add:
    Code:
    <p><?php echo 'php within html';?></p>
    Just make sure that any page that contains html is saved as a .php file.
     

Share This Page