Solved

alignment vertical text of the label

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

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Hi all! Recently there was EE question and the person wanted to have a multi-column textbox <div> selection, so as a first step to answer I provided a link but that was not complete with JavaScript selection, but had a good style sheet. So as a ques…
The most up-to-date version of this article is on my Blog https://iconoun.com/blog/
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)

724 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