Menu will not move to the right, any ideas?

Discussion in 'CSS' started by gobbly2100, Nov 1, 2008.

  1. #1
    Hey all,

    I am getting frustrated with this one, I can't get a menu to auto center for some strange reason.

    Huxley Forum

    On the main site I have it looking how I want it no problem but for some reason in my forum it seems as though it just does not want to respond to what I want it to do.

    I guess it is inheriting something somewhere but have no idea what.

    Would really appreciate any help on this one, thanks!
     
    gobbly2100, Nov 1, 2008 IP
  2. faithnomoread

    faithnomoread Peon

    Messages:
    174
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #2
    From what I've seen so far you already have a 10px leak here:
    
    ul#headnav li a{
    	float: left;
    	text-align: center;
    	color: white;
    	text-decoration: none;
    	background-image:url(/images/buttons/buttons.gif);
    	background-position: top;
    	width: 150px;
    	line-height: 25px;
    	margin: 7px 10px 0px [COLOR="Red"][B]10px[/B][/COLOR];
    	padding: 0;
    }
    
    Code (markup):
    I'm still looking, but you're not that far off center. Maybe try putting text-align:center in your header-03.
     
    faithnomoread, Nov 1, 2008 IP
  3. justinlorder

    justinlorder Peon

    Messages:
    4,160
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    0
    #3
    I review your site, the menus are in center. where is the problem ? I can help you with the problem.

    hello, faithnomoread

    margin: 7px 10px 0px ; (equals to margin-top:7px; margin-left:10px; margin-right:10px; margin-bottom:0px)
    margin: 7px 10px 0px 10px; (equals to margin-top:7px; margin-left:10px; margin-right:10px; margin-bottom:0px)

    The two type of css are the same meaning .
     
    justinlorder, Nov 1, 2008 IP
  4. faithnomoread

    faithnomoread Peon

    Messages:
    174
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #4
    The order is top, right, bottom, left, but the margin-right causes the menu to be 10px too far to the right.
     
    faithnomoread, Nov 1, 2008 IP
  5. justinlorder

    justinlorder Peon

    Messages:
    4,160
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    0
    #5
    You are right .

    But
    margin: 7px 10px 0px ;
    margin: 7px 10px 0px 10px; the two are the same.

    If you write css like margin: figureA px figureB px figureC px ;
    the first figure means margin top.
    the second figure means both left and right margin.
    the third figure means the margin bottom.
     
    justinlorder, Nov 1, 2008 IP
  6. faithnomoread

    faithnomoread Peon

    Messages:
    174
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Thank you, I had wondered about that, when I usually come to something like that I just usually set each side: margin-left, margin-right, etc... I see there's a 30 px gap between the header and the menu so there is leeway there.
     
    faithnomoread, Nov 1, 2008 IP
  7. justinlorder

    justinlorder Peon

    Messages:
    4,160
    Likes Received:
    61
    Best Answers:
    0
    Trophy Points:
    0
    #7
    If you write css like margin: figureA px figureB px figureC px ; (css shorten)

    In this case , you have to set left and right margin to the same figure .
    If you would like to set different figures, you should use four figures as normal .
     
    justinlorder, Nov 1, 2008 IP
  8. ElseAndrew

    ElseAndrew Peon

    Messages:
    77
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #8
    It seems VB have a class for the menu anyway. So try this:

    <style>
    .vbmenu_option {
    text-align: center;
    }
    </style>

    Sorry if it does not work, i have never played with VB before.
     
    ElseAndrew, Nov 2, 2008 IP
  9. bigroddy

    bigroddy Peon

    Messages:
    78
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Why not set the left/right margins to auto?

    The 10px margin on the right wont make a difference if the content of the div doesn't go right to the edge of where it should be.
     
    bigroddy, Nov 2, 2008 IP
  10. witsols

    witsols Peon

    Messages:
    102
    Likes Received:
    2
    Best Answers:
    0
    Trophy Points:
    0
    #10
    Please set the margins as follows.


    margin: 7px 10px 0px 10px;

    Regards,

    Zubair.
     
    witsols, Nov 4, 2008 IP