Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

HTML Forum


You are currently viewing our HTML Forum as a guest. Please register to participate.
Login



Post a Project »

Find a Professional HTML Freelancer!

Find a Freelancer to help you with your HTML projects

FREE Outsourcing eBook!

Reply
Old 09-29-2010, 06:41 AM V-Align DIV
Skilled Talker

Posts: 78
Name: Ash Kwil
Trades: 0
Ok here is a menu bar I have on my forum and the CSS attached with it, any idea how i can get the buttons to be vertically centred on the divs BG?

Code:
Code:
<div id="nav_back" >
 
   <center>
   <a class="nav_buttons" href="{U_INDEX}"><img src="{T_THEME_PATH}/images/nav_home.png" border="0" alt="" /></a>
   <!-- IF S_USER_LOGGED_IN -->
   <a class="nav_buttons" href="{U_PROFILE}"><img src="{T_THEME_PATH}/images/nav_user_cp.png" border="0" alt="" /></a>
   <!-- ENDIF -->
   <!-- IF not S_USER_LOGGED_IN -->
   <a class="nav_buttons" href="{U_REGISTER}"><img src="{T_THEME_PATH}/images/nav_register.png" border="0" alt="" /></a>
   <!-- ENDIF -->
   <a class="nav_buttons" href="{U_SEARCH_ACTIVE_TOPICS}"><img src="{T_THEME_PATH}/images/nav_active.png"  border="0" alt="" /></a>
   <a class="nav_buttons" href="{U_MEMBERLIST}"><img src="{T_THEME_PATH}/images/nav_members.png"  border="0" alt="" /></a>
   <a class="nav_buttons" href="{U_SEARCH}" rel="nofollow"><img src="{T_THEME_PATH}/images/nav_search.png" border="0" alt="" /></a>
   <a class="nav_buttons" href="{U_FAQ}"><img src="{T_THEME_PATH}/images/nav_faq.png" border="0" alt="" /></a>
 
<a class="nav_buttons" href="{U_PRIVATEMSGS}"><img src="{T_THEME_PATH}/images/nav_pms.png" border="0" alt="" /></a>
<a class="nav_buttons" href="{U_LOGIN_LOGOUT}"><img src="{T_THEME_PATH}/images/nav_logout.png" border="0" alt="" /></a>
   </center>
</div>
Here is the CSS

Code:
#nav_back {
 background-image: url("{T_THEME_PATH}/images/nav_back.jpg");
 height: 37px
}
.nav_buttons {
 padding-left: 3px;
 padding-right: 3px;
 padding-top: 1px;
}
Thanks a lot
Ashkwil is offline
Reply With Quote
View Public Profile Visit Ashkwil's homepage!
 
 
Register now for full access!
Old 09-29-2010, 02:54 PM Re: V-Align DIV
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Use padding and/or margins on the <a> tags.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
Reply With Quote
View Public Profile
 
Old 09-29-2010, 09:33 PM Re: V-Align DIV
Physicsguy's Avatar
404 - Title not found

Posts: 919
Name: Scott Kaye
Location: Ontario
Trades: 0
Use a table that spans the size you need to, then just have a td with valign="middle" or center I forget :P
__________________
Check out my
Please login or register to view this content. Registration is FREE
or my
Please login or register to view this content. Registration is FREE
!
Physicsguy is offline
Reply With Quote
View Public Profile
 
Old 09-30-2010, 05:17 AM Re: V-Align DIV
Kelpie's Avatar
Skilled Talker

Posts: 82
Name: Andrew
Location: SW Scotland
Trades: 0
Quote:
Originally Posted by Physicsguy View Post
Use a table
Please don't. Tables should only be use for tabular data, not for layout
Kelpie is offline
Reply With Quote
View Public Profile
 
Old 10-04-2010, 09:57 PM Re: V-Align DIV
inklight's Avatar
Average Talker

Posts: 19
Name: Salem
Trades: 0
change to this
HTML Code:
#nav_back {
 background-image: url("{T_THEME_PATH}/images/nav_back.jpg");
   width:190px;
}
and remove center tag if u have to use padding instead .

and surly you need to change the background too and make it vertical
__________________

Please login or register to view this content. Registration is FREE
inklight is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to V-Align DIV
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 1.10776 seconds with 12 queries