+ Reply to Thread
Results 1 to 5 of 5

Thread: CSS Centering Problems or Why I'll Probably Make it From Scratch Next Time

  1. #1
    Ԍuest's Avatar
    Ԍuest is offline x10Hosting Member Ԍuest is an unknown quantity at this point
    Join Date
    Mar 2011
    Location
    Ninja HQ
    Posts
    9

    Question CSS Centering Problems or Why I'll Probably Make it From Scratch Next Time

    So I am pretty much just jumping in to CSS, PHP and maybe Javascript very soon. This was not my idea because its not my actual job, but whatever, I am getting paid to learn this stuff and come up with a great teaser site for work. It beats answering the phones and listening to people complain about their stocks.

    Enough talk! NOW WE CODE!!! Or in my case, take something easy and tweek it until it works and then go OH I see now!

    So here is the mockup site:
    http://dojo.secretworldwideorgofunit....com/index.php

    Here is the CSS code for the navigation bar:
    http://pastebin.com/zBgKWuqW

    As you can tell, I did not do this myself and some of this code needs to meet the cutting room floor because there are no dropdowns, but templates (I thought) would be quick and easy so why not? Because I cannot figure out which of these values needs to have itself doing it or exactly why align:center or position:center just won't cut it.

    Arigatou in advance. *bow*

  2. #2
    misson is offline x10 Spammer misson is a jewel in the rough
    Join Date
    Mar 2008
    Location
    Libertatia
    Posts
    2,506

    Re: CSS Centering Problems or Why I'll Probably Make it From Scratch Next Time

    What's the issue? When asking for help, you should describe exactly what you want and compare it to what you have.

    Rather than guessing at what CSS properties exist and what they are, find a good reference. Nothing beats the CSS 2.1 specification, but if you find it hard to read, there are other CSS references. HTML Dog's CSS tutorials may also be helpful (I haven't taken a close look, so I can't speak to their quality with any surety, but what I've seen looks good).

    There is no "center" value for the "position" property. Use "position" to choose a positioning scheme, not alignment. Centering is handled with other properties. For horizontal alignment, there's the text-align property for inline boxes, or the left & right margin properties (set to "auto") for block boxes.
    Last edited by misson; 03-11-2011 at 12:53 AM.
    Be sure to read all pages linked in this post; they have further information that should prove useful. When asking for help, make sure you follow Eric Raymond's and Jon Skeet's guidelines for prompt, accurate responses. Please answer any questions I ask; they're not rhetorical (probably). Any posted code is intended as illustrative example, rather than a solution to your problem to be copied without alteration. Study it to learn how to write your own solution.
    Misson, not Mission.

  3. #3
    Ԍuest's Avatar
    Ԍuest is offline x10Hosting Member Ԍuest is an unknown quantity at this point
    Join Date
    Mar 2011
    Location
    Ninja HQ
    Posts
    9

    Re: CSS Centering Problems or Why I'll Probably Make it From Scratch Next Time

    Oh man, I have to stop posting so late at night.

    Issue: The menu bar was not centered. Now it is centered, but instead of being horizontal its vertical. D'oh! So close yet so far.

  4. #4
    tommieonos84 is offline x10Hosting Member tommieonos84 is an unknown quantity at this point
    Join Date
    Nov 2010
    Posts
    18

    Re: CSS Centering Problems or Why I'll Probably Make it From Scratch Next Time

    that's one hell of a menu you've chosen there...

    but to make it a bar instead of a square, you'll have to do set display:block to display:inline, but you have to figure out yourself wich ones. I guess the li and maybe the A

  5. #5
    Ԍuest's Avatar
    Ԍuest is offline x10Hosting Member Ԍuest is an unknown quantity at this point
    Join Date
    Mar 2011
    Location
    Ninja HQ
    Posts
    9

    Re: CSS Centering Problems or Why I'll Probably Make it From Scratch Next Time

    Yay! Its fixed. Thanks Tommieonos84

+ Reply to Thread

Similar Threads

  1. First Time Add-On Domain - Problems
    By whollick in forum Free Hosting
    Replies: 2
    Last Post: 06-03-2010, 09:25 PM
  2. how do you make a page only accessable after a certain time?
    By qwertyuiop12 in forum Programming Help
    Replies: 7
    Last Post: 07-15-2009, 04:36 PM
  3. flash 8 make a time on my video
    By shaunNO2007 in forum Graphics & Webdesign
    Replies: 1
    Last Post: 01-11-2008, 06:38 PM
  4. flash 8 make a time on my video
    By shaunNO2007 in forum Tutorials
    Replies: 0
    Last Post: 01-05-2008, 11:31 AM

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
x10hosting free hosting for the masses
dedicated servers