Go Back   Cyber Tech Help Support Forums > Software > Web Development & Graphic Design

Notices

Reply
 
Topic Tools
  #1  
Old May 15th, 2008, 09:20 PM
chadi chadi is offline
Senior Member
 
Join Date: Feb 2004
Posts: 157
Talk Jesus Login

Installed this vbulletin mod today
http://www.vbulletin.org/forum/showthread.php?t=158473

Unfortunately, the author has not logged into VB since Dec 2007, so I'm hoping to get some help here.

Anyone know how to get an small (16x16px) image icon vertically aligned with the text?

Current code used

Code:
<if condition="$show[guest]">
<if condition="$vboptions[login_popup_autodisplay]">
    <td class="nav_menu_control">
    <img src="images/key.png" align="Member Login" />&nbsp;
</if>
        <a id="navbar_login" href="$vboptions[forumhome].php$session[sessionurl_q]">$vbphrase[log_in]</a> 
        <script type="text/javascript"> vbmenu_register("navbar_login"); </script>
<if condition="$vboptions[login_popup_autodisplay]">
    </td>
</if>
</if>
Notice the text is lowered when an icon is inserted. I've tried various methods, even div tag to no avail.

(click image to see full version)

__________________
Talk Jesus Forums & Live Chat www.talkjesus.com
[ Awesome Facts of Jesus Christ: click here ]
Reply With Quote
  #2  
Old May 15th, 2008, 09:50 PM
Buzz's Avatar
Buzz Buzz is offline
Cyber Tech Help Moderator
 
Join Date: Sep 2000
O/S: MacOS
Location: Oregon, USA
Posts: 3,327
Code:
.loginicon { display: block; width: 16px; height: 16px; vertical-align: bottom;}
vertical-align: middle;
vertical-align: top;

may also work.
Another way is to simply add padding-top to the css for the icon.
__________________
Scott
Moderator : Macintosh : Website & Graphics
Adobe Certified Expert: Illustrator
Royalty-Free Vector Stock Art
Reply With Quote
  #3  
Old May 15th, 2008, 10:05 PM
chadi chadi is offline
Senior Member
 
Join Date: Feb 2004
Posts: 157
I can't get this to work unfortunately. Tried all 3 positions.

Code:
#login {
    display: block; width: 16px; height: 16px; vertical-align: middle;
}
Tried many ways
Code:
<if condition="$show[guest]">
<if condition="$vboptions[login_popup_autodisplay]">
    <td class="nav_menu_control">
    <img src="images/key.png" align="Member Login" id="login" />&nbsp;
</if>
        <a id="navbar_login" href="$vboptions[forumhome].php$session[sessionurl_q]">$vbphrase[log_in]</a> 
        <script type="text/javascript"> vbmenu_register("navbar_login"); </script>
<if condition="$vboptions[login_popup_autodisplay]">
    </td>
</if>
</if>
Code:
<if condition="$show[guest]">
<if condition="$vboptions[login_popup_autodisplay]">
    <td class="nav_menu_control" id="login">
    <img src="images/key.png" align="Member Login" />&nbsp;
</if>
        <a id="navbar_login" href="$vboptions[forumhome].php$session[sessionurl_q]">$vbphrase[log_in]</a> 
        <script type="text/javascript"> vbmenu_register("navbar_login"); </script>
<if condition="$vboptions[login_popup_autodisplay]">
    </td>
</if>
</if>
Tried <div id="login"> tag at the beginning, before the td tag, before img tag, etc.
__________________
Talk Jesus Forums & Live Chat www.talkjesus.com
[ Awesome Facts of Jesus Christ: click here ]
Reply With Quote
  #4  
Old May 15th, 2008, 11:02 PM
Buzz's Avatar
Buzz Buzz is offline
Cyber Tech Help Moderator
 
Join Date: Sep 2000
O/S: MacOS
Location: Oregon, USA
Posts: 3,327
Even this?

Code:
img#login { padding-top: 4px; }
__________________
Scott
Moderator : Macintosh : Website & Graphics
Adobe Certified Expert: Illustrator
Royalty-Free Vector Stock Art
Reply With Quote
  #5  
Old May 15th, 2008, 11:08 PM
chadi chadi is offline
Senior Member
 
Join Date: Feb 2004
Posts: 157
Using this below, it bought both of them down further

Code:
<if condition="$show[guest]">
<if condition="$vboptions[login_popup_autodisplay]">
    <td class="nav_menu_control">
    <img src="images/key.png" align="Member Login" id="login" />&nbsp;
</if>
        <a id="navbar_login" href="$vboptions[forumhome].php$session[sessionurl_q]">$vbphrase[log_in]</a> 
        <script type="text/javascript"> vbmenu_register("navbar_login"); </script>
<if condition="$vboptions[login_popup_autodisplay]">
    </td>
</if>
</if>
By the way, the icon itself has always shown vertically in the middle (correct). The problem is the text getting pushed down instead of vertically middle.
__________________
Talk Jesus Forums & Live Chat www.talkjesus.com
[ Awesome Facts of Jesus Christ: click here ]
Reply With Quote
  #6  
Old May 15th, 2008, 11:30 PM
Buzz's Avatar
Buzz Buzz is offline
Cyber Tech Help Moderator
 
Join Date: Sep 2000
O/S: MacOS
Location: Oregon, USA
Posts: 3,327
This seems to line them up very well....

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
	<meta http-equiv="content-type" content="text/html; charset=utf-8" />
	<title>Test</title>
	<style type="text/css">
	<!--
	img#login { vertical-align: top; }
	
	-->
	</style>
</head>

<body>
<table cellpadding="10" cellspacing="5" border="1" align="center">
<tr>
<td class="nav_menu_control">
    <img src="images/key.png" align="Member Login" id="login" />&nbsp;
        <a id="navbar_login" href="$vboptions[forumhome].php$session[sessionurl_q]">$vbphrase[log_in]</a> 
        <script type="text/javascript"> vbmenu_register("navbar_login"); </script>
    </td>
    </tr>
    </table>
    
    
</body>
</html>
but of course I don't have any other styling going on.
__________________
Scott
Moderator : Macintosh : Website & Graphics
Adobe Certified Expert: Illustrator
Royalty-Free Vector Stock Art
Reply With Quote
  #7  
Old May 15th, 2008, 11:33 PM
chadi chadi is offline
Senior Member
 
Join Date: Feb 2004
Posts: 157
Awesome, that did work! Thanks Buzz, appreciate it.
__________________
Talk Jesus Forums & Live Chat www.talkjesus.com
[ Awesome Facts of Jesus Christ: click here ]
Reply With Quote
Reply

Bookmarks

Topic Tools

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
Forum Jump


All times are GMT +1. The time now is 01:09 AM.

[ RSS ]