Solved

alignment vertical text of the label

Posted on 2015-02-12
1
81 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

MIM Survival Guide for Service Desk Managers

Major incidents can send mastered service desk processes into disorder. Systems and tools produce the data needed to resolve these incidents, but your challenge is getting that information to the right people fast. Check out the Survival Guide and begin bringing order to chaos.

Question has a verified solution.

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

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
How to build a simple, quick and effective accordion menu using just 15 lines of jQuery and 2 css classes
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)

732 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