Solved

alignment vertical text of the label

Posted on 2015-02-12
1
80 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 500 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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP and JQuery Syntax question 4 34
How Close unsubmited attempts 10 42
Getting selected value using Jquery 3 19
Print a <div></div> only 5 34
Requirements JQuery 1.6+ HTML CSS Introduction This article was inspired by an EE question (http://www.experts-exchange.com/Programming/Languages/Scripting/JavaScript/Q_28372511.html) on how to make a page show some balloons animate up a page…
Introduction Chart.js, used properly, can visually add a difference to your charting applications. It engages your visitors and allows them to interact with data they otherwise wouldn't be able to without expensive and complicated systems. For this…
The viewer will learn how to dynamically set the form action using jQuery.
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)

740 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