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 5 of 5
  1. #1
    New to the CF scene
    Join Date
    Mar 2013
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Text and heading not centered

    Hi,

    I wonder if anyone could help me?

    The heading on my website and the menu below it do not appear centered.

    Could anyone help with my CSS?

    The URL is http://176.32.230.11/retrocomputeruser.com/index.html

    Many thanks

    Peter Jones
    Crawley
    UK

  • #2
    Senior Coder
    Join Date
    Jan 2011
    Location
    Missouri
    Posts
    4,180
    Thanks
    23
    Thanked 602 Times in 601 Posts
    * {
    margin: 0; // ADD THIS
    padding: 0; // ADD THIS
    font-family: Arial, Verdana, sans-serif;
    color: #665544;
    text-align: center;}
    Evolution - The non-random survival of random variants.

    "If you leave hydrogen alone, for long enough, it begins to think about itself."

  • #3
    New Coder
    Join Date
    May 2009
    Posts
    45
    Thanks
    0
    Thanked 3 Times in 3 Posts
    If you wanted to keep from using "text-align:center" in your CSS because it's centering all text, I would suggest creating a "wrapper" that contains your header and navigation and use margin: 0px auto; as the property/value. You can then apply "text-align:center" to just the header if you want. Or, style the header another way without affecting the remainder of you content.

    Code:
    #wrapper {
    	width: 600px;
    	margin: 0px auto;
    }
    
    #header {
    	text-align: center;
    }
    
    <div id="wrapper">
    <div id="header">Header</div>
    </div>

  • #4
    New to the CF scene
    Join Date
    Mar 2013
    Posts
    3
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Thanks

    Thanks for the replies. Much appreciated.

    Peter Jones
    Last edited by VIPStephan; 04-01-2013 at 05:52 PM. Reason: Removed link

  • #5
    New to the CF scene
    Join Date
    Mar 2013
    Location
    Cebu City , Philippines
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i think a simple tag <center> can make it solve


  •  

    Tags for this Thread

    Posting Permissions

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