Image under text in an HTML email

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>

<body style="font-family: 'Myriad Pro', sans-serif;font-size: 16px;font-weight: 400;color: #252525;">
    <table style="width: 100%;max-width: 600px;margin: 0 auto;">
        <tr style="width: 100%;height: 0;">
            <td></td>
            <td rowspan="2">
                <img src="http://images5.fanpop.com/image/photos/30800000/-Random-random-30843841-1920-1080.jpg" alt="Background">
            </td>
        </tr>
        <tr>
            <td colspan="2" style="vertical-align: top;padding-top: 27px;">
                <table style="width: 100%;">
                    <tr>
                        <td>Some purely random text</td>
                    </tr>
                </table>
            </td>
        </tr>
    </table>


</body>
</html>

 

Styling a radio box with CSS

the CSS:

label {  
    display: inline-block;  
    cursor: pointer;  
    position: relative;  
    padding-left: 25px;  
    margin-right: 15px;  
    font-size: 13px;  
}  

input[type=radio] {  
    display: none;  
}  

label:before {  
    content: "";  
    display: inline-block;  

    width: 16px;  
    height: 16px;  

    margin-right: 10px;  
    position: absolute;  
    left: 0;  
    bottombottom: 1px;  
    background-color: #aaa;  
    box-shadow: inset 0px 2px 3px 0px rgba(0, 0, 0, .3), 0px 1px 0px 0px rgba(255, 255, 255, .8);  
}  

input[type=radio]:checked + label:before {  
    content: "\2022";  
    color: #f3f3f3;  
    font-size: 30px;  
    text-align: center;  
    line-height: 18px;  
}  

.radio label:before {  
    border-radius: 8px;  
}

the HTML

<div class="radio">  
    <input id="male" type="radio" name="gender" value="male">  
    <label for="male">Male</label>  
    <input id="female" type="radio" name="gender" value="female">  
    <label for="female">Female</label>  
</div>

 

Simple HTML slidebar – works on mobile

<!DOCTYPE html>
<html>
<head>
<style type="text/css">

#bar{
    width:200px;
    height:25px;
    border:1px solid black;
    position:relative;
}

#slider{
    width:0%;
    height:100%;
    background-color:red;
    top:0px;
    left:0px;
    position:absolute;
    cursor:pointer;
}

#info{
    width:200px;
    height:25px;
    border:1px solid black; 
}

</style>

<script type="text/javascript">
var bar, slider;

function init(){

    bar = document.getElementById('bar');
    slider = document.getElementById('slider');
    info = document.getElementById('info');
    bar.addEventListener('mousedown', startSlide, false);   
    bar.addEventListener('mouseup', stopSlide, false);
}

function startSlide(event){
    var set_perc = ((((event.clientX - bar.offsetLeft) / bar.offsetWidth)).toFixed(2));
    info.innerHTML = 'start' + set_perc + '%';  
    bar.addEventListener('mousemove', moveSlide, false);    
    slider.style.width = (set_perc * 100) + '%';    
}

function moveSlide(event){
    var set_perc = ((((event.clientX - bar.offsetLeft) / bar.offsetWidth)).toFixed(2));
    info.innerHTML = 'moving : ' + set_perc + '%';
    slider.style.width = (set_perc * 100) + '%';
}

function stopSlide(event){
    var set_perc = ((((event.clientX - bar.offsetLeft) / bar.offsetWidth)).toFixed(2));
    info.innerHTML = 'done : ' + set_perc + '%';
    bar.removeEventListener('mousemove', moveSlide, false);
    slider.style.width = (set_perc * 100) + '%';
}

</script>

</head>
<body onload='init()'>

<div id='bar'>
<div id='slider'>

</div>
</div>
<br />

<div id='info'>info</div>

</body>
</html>