Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

alignment vertical text of the label

Posted on 2015-02-12
1
Medium Priority
?
87 Views
Last Modified: 2015-02-12
Hi,

I have the following code

<input precio = "<?php echo number_format(round($loop[$loopProtecciones->name]*1.5,2),2,".",",")?>" type="radio" name="protecciones" id="<?php echo $loopProtecciones->name ?>" class="custom" value="<?php echo $loopProtecciones->name ?>"/>
                                                    <label for="<?php echo $loopProtecciones->name ?>"><?php echo $loopProtecciones->name." - $".number_format(round($loop[$loopProtecciones->name]*1.5,2),2,".",",") ?><img src="imagenes/logotelefono.jpg"></label>

Open in new window


I need two the text appears vertically center. This is a jQuery mobile page
0
Comment
Question by:joyacv2
1 Comment
 
LVL 38

Accepted Solution

by:
Tom Beck earned 2000 total points
ID: 40607006
Wrap the radio button and the image in a <div> then give the radio button a height equal to the image height.

Example with a 70px tall image:

<style type="text/css">
.radioImg input { height:70px }
</style>

<div class="radioImg">
    <input type="radio" name="radio1" id="radio1" />
    <label for="radio1"><img src="img/70pxTall.png" alt="" /></label>
</div>
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

I have answered several questions lately that were solved utilizing the power of jQuery's AJAX functions, so I thought I would write an article demonstrating the ease of use. Why should I use jQuery as opposed to regular JavaScript? Now I know…
PROBLEM: The other day I was working on adding an ajax request to a webpage that already had a dialog box on the page.  The dialog box was using relative positioning to be positioned next to a form field I had on the page.  Everything was working…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

971 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question