Wordpress Themes - WP Forum at BFA

Wordpress Themes - WP Forum at BFA (http://forum.bytesforall.com/index.php)
-   Sidebars & Widgets (http://forum.bytesforall.com/forumdisplay.php?f=14)
-   -   [SOLVED] Can't vertically align text in custom widget (http://forum.bytesforall.com/showthread.php?t=16348)

tsheridan Dec 27, 2011 01:40 PM

[SOLVED] Can't vertically align text in custom widget
 
I have created a custom widget above the logo/header and in this widget I have placed a Contact Us link and the search box. I can't seem to vertically align the text to match up with the search box however. How can I do this?

Here is the code from my widget:

<div style="font-size: 16px; text-align: right; margin-bottom: 10px; color: #ffffff;"><a href="http://www.reapfoundation.org/contact">Contact Us</a>
<div class="searchbox" style="float: right;"> <form method="get" class="searchform" action="http://www.reapfoundation.org/"> <div class="searchbox-form"><input type="text" class="text inputblur" onfocus="this.value=''" value="Search this site" onblur="this.value='Search this site'" name="s" /></div></form></div>
</div>

I've tried top padding in the outer div, I've tried adding a div just for the text, I've used firebug to try to find which divs I can change and tried all sorts of stuff in the CSS inserts, but I can't seem to find the right combination or area to change.

The URL is www.reapfoundation.org.

I'm using the most recent versions of Atahualpa and WP.

Thank you!

lmilesw Dec 27, 2011 02:45 PM

I was trying to come up with some "hints" but couldn't so try the following in CSS Inserts.
HTML Code:

#text-2 a {
    top: 5px;
    position: relative;
}

All I did was use Firebug to determine the selector and play with CSS in Firebug to see what worked. Then, if I was implementing this, I would have copied the code from Firebug and pasted it into CSS Inserts

tsheridan Dec 27, 2011 04:33 PM

That worked, thank you! I tried some CSS using that div, but I tried vertical-align: middle;.


All times are GMT -6. The time now is 01:09 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.