[help] Center aligning

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • khan
    replied
    Simple way to aligning center. in html and php as well.try this
    PHP Code:
    echo "<center>Hello Buddy.:)</center>"

    Leave a comment:


  • RJNzone
    replied
    thanks for that dude.. i have little knowledge about this.. try to feedback

    Added after 16 minutes:

    body {
    text-align: center;
    max-width: 400px;
    margin:0px auto 0px;
    font-family:Verdana, Arial, Helvetica, sans-serif;
    font-size:12px;
    background-color: #282828;
    color: #CCCCCC;
    text-align: center;
    }

    .aligncenter {
    text-align : center;
    }


    still it's all in left side.. help pls..
    Last edited by RJNzone; 24.09.10, 17:41.

    Leave a comment:


  • metulj
    replied
    Originally posted by RJNzone View Post
    My wap are all place in the left side, what shoud i do to put in in the center?
    for WML:
    PHP Code:
    <?php
    echo "<p align=\"center\">";
    echo 
    "your code to be centered";
    echo 
    "</p>";
    ?>
    it can be used also for XHTML,
    though i prefer CSS in XHTML like
    create file style.css with code:
    PHP Code:
    .aligncenter {
    text-align center;

    usage:
    PHP Code:
    <?php
    echo "<head>";
    echo 
    "<link rel=\"stylesheet\" type=\"text/css\" href=\"style/style.css\"/>";
    echo 
    "</head>";

    echo 
    "<div class=\"aligncenter\">";
    echo 
    "your code to be centered";
    echo 
    "</div>";
    ?>

    Leave a comment:


  • RJNzone
    started a topic [help] Center aligning

    [help] Center aligning

    My wap are all place in the left side, what shoud i do to put in in the center?
Working...
X