Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Registered User
    Join Date
    Oct 2006
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Question Text not Centering!

    grrr, i have some misbehaving text that forsomereason is deciding to go to the left when i say Text-align: center;
    i validated the page and everything and it still is messing up. i deleted the text-align: left; in the wrapper div and it still is acting up! im stumped.

    relevent code:
    Code:
    #content {
    background:#7B9ABB;
    text-align:center;
    }
    ---
    Code:
    	<div id="content">
    	     <?PHP
              $number = "5";
              include("cutenews/show_news.php");
             ?>
    	</div>
    the page renders as so: http://flashanims.com/flashanims.php

    view the source to see the entire code. thanks!

  • #2
    Regular Coder
    Join Date
    Apr 2006
    Posts
    231
    Thanks
    9
    Thanked 1 Time in 1 Post
    Check cutenews template. You are just including a few divs in there. The text properties will inherit the actual div they are in, not layers.

  • #3
    Supreme Master coder! _Aerospace_Eng_'s Avatar
    Join Date
    Dec 2004
    Location
    In a place far, far away...
    Posts
    19,291
    Thanks
    2
    Thanked 1,043 Times in 1,019 Posts
    Try this for your #content div
    Code:
    #content {
    background:#7B9ABB;
    width:420px;
    margin:auto;
    text-align:left;
    }
    text-align:center; does not center block level elements
    ||||If you are getting paid to do a job, don't ask for help on it!||||

  • #4
    Registered User
    Join Date
    Oct 2006
    Posts
    80
    Thanks
    0
    Thanked 0 Times in 0 Posts
    oh, i thought the cutenews shownews.php only generated text and the rest was up to me for actually using it (ie: divs etc) thanks!


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •