cant get this to align properly

Discussion in 'HTML & Website Design' started by damnidunno, May 16, 2007.

  1. #1
    I sold my IPB license and moved to a free forum script, and the conversion is going great with the skin i made for IPB, but i ran into this one problem and i cant seem to fix it


    It's with the navigation bar
    this is what it looks like in IPB
    [​IMG]
    which is correct everything is aligned evenly in the middle..

    But in MyBB it looks like:
    [​IMG]

    And i have no idea why its doing that. I have almost the same exact code on ipb as i do on mybb which is:


    can anyone help?
    thanks
    <table cellspacing="0" id="navbar">
    	<tr><td  valign="middle"><img src='images/damn5/nav.gif' border='0'  alt='&gt;' />  {$nav}{$activesep}{$activebit}</td>			
    		</td>
    	</tr>
    </table>
    Code (markup):
     
    damnidunno, May 16, 2007 IP
  2. kernes

    kernes Peon

    Messages:
    184
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    i think you should use css buddy
     
    kernes, May 16, 2007 IP
  3. damnidunno

    damnidunno Well-Known Member

    Messages:
    1,286
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    155
    #3
    I think you shouldn't reply unless you're really going to help

    all my sites are valid css and xhtml 1.0 at least.

    But these forum scripts usually use tables, and you cant really properly align things vertically in the middle with css. If so, mention it in your reply, or don't bother.

    Thanks though buddy ;)
     
    damnidunno, May 16, 2007 IP
  4. kernes

    kernes Peon

    Messages:
    184
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    ok buddy i just wanted to help you

    i know in css there is a code margin-top and margin-left that modify the tables'
    position i just want to tell this buddy

    Regards
     
    kernes, May 16, 2007 IP
  5. damnidunno

    damnidunno Well-Known Member

    Messages:
    1,286
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    155
    #5
    yes but then it'd have the effect on the graphics too. i probably could put a margin or padding on the bottom of the text only which could give it the same effect. i'll probaby try that now.

    Sorry that i replied that way ,i thought you were being sarcastic. Alot of people reply thinking they know more and don't really help, so i read your post wrong.
     
    damnidunno, May 16, 2007 IP
  6. kernes

    kernes Peon

    Messages:
    184
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #6
    ok i got a little bit sad because of your reply but you have every reason to complain.now i m happy because you understood that i want to help you
    i just try to suggest as i know
     
    kernes, May 17, 2007 IP
  7. parag

    parag Banned

    Messages:
    62
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #7
    Use the following CSS code for that particular table/td
    <table cellspacing="0" id="navbar">
    	<tr><td  class="navimg">{$nav}{$activesep}{$activebit}</td>		
    		</td>
    	</tr>
    </table>
    Code (markup):
    .navimg{
    margin-right: 5px; 
    height: 45px;
    background:url(images/damn5/nav.gif) no-repeat left center;
    }
    Code (markup):
    - Parag
     
    parag, May 17, 2007 IP
  8. damnidunno

    damnidunno Well-Known Member

    Messages:
    1,286
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    155
    #8
    didnt work right. The text was hovering over the icon, but i fixed that by putting a margin left on the text itself. But it still didnt look right.
    thanks though


    But i found out how to fix it!

    i resolved it by inserting:
    img{
    		vertical-align: middle;
    }
    Code (markup):
    into the css :d
     
    damnidunno, May 17, 2007 IP
  9. parag

    parag Banned

    Messages:
    62
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #9
    Glad you fixed it!!! :)
     
    parag, May 17, 2007 IP
    damnidunno likes this.
  10. damnidunno

    damnidunno Well-Known Member

    Messages:
    1,286
    Likes Received:
    22
    Best Answers:
    0
    Trophy Points:
    155
    #10
    thanks :D and thank you for actually trying to help me :D
    if i knew how to do that rep stuff, i'd give you some. hehe

    edit:
    nvm just gave you some.
     
    damnidunno, May 17, 2007 IP
  11. parag

    parag Banned

    Messages:
    62
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    0
    #11
    Thanks for the Rep :)
    Good luck for your other designs!!
     
    parag, May 17, 2007 IP
  12. Robin Huurman

    Robin Huurman Peon

    Messages:
    18
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #12
    There could be another way. line-height: 45px;
     
    Robin Huurman, May 17, 2007 IP