Vertical Align Images - Explained
How do I make an vertical align images - explained?
This is a little tool for any of you who don't fully understand the vertical-align property and would like a visual guide to answer your questions :). What is a vertical align images - explained? How do you make a vertical align images - explained? This script and codes were developed by Matt Litherland on 03 August 2022, Wednesday.
Vertical Align Images - Explained - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Vertical Align Images - Explained</title> <script src="http://s.codepen.io/assets/libs/modernizr.js" type="text/javascript"></script> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container"> <div class="text-box"> <div class="inner"> <img class="image" src="https://s3-us-west-2.amazonaws.com/s.cdpn.io/44720/flag.png" />Jag Älskar CodePen.io </div> </div> <div class="lineA"></div> <div class="lineB"></div> <div class="lineC"></div> <div class="lineD"></div> <div class="lineE"></div> <div class="lineF"></div> <div class="lineG"></div> <div class="lineH"></div>
</div>
<div class="image-controls"> <label> <select id="img-pos" name="imagepos"> <option selected>Change Vertical Alignment</option> <option class="webkit-baseline-middle">-webkit-baseline-middle</option> <option class="baseline">baseline</option> <option class="sub">sub</option> <option class="super">super</option> <option class="bottom">bottom</option> <option class="inherit">inherit</option> <option class="middle">middle</option> <option class="text-bottom">text-bottom</option> <option class="text-top">text-top</option> <option class="top">top</option> </select> </label>
</div>
<div class="image-controls"> <p>If you're a bit confused as to what all the vertical-align options are on your select boxes then you need not worry! have a little play with the select box above and your questions will be answered!</p> <p><b>Translation from Swedish</b>: <i>"I Love CodePen.io"</i></p>
</div> <script src='http://cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'></script> <script src="js/index.js"></script>
</body>
</html>
Vertical Align Images - Explained - Script Codes CSS Codes
*, *:before, *:after { -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box;
}
html { width: 100%; height: 100%; margin: 0; padding: 0;
}
select { display: block; width: 100%; height: 34px; padding: 6px 12px; font-size: 14px; line-height: 1.428571429; color: #555; vertical-align: middle; background-color: #fff; background-image: none; border: 1px solid #ccc; border-radius: 4px; -webkit-box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075); -webkit-transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s; transition: border-color ease-in-out .15s,box-shadow ease-in-out .15s;
}
body { height: 100%; width: 100%; padding: 20px; -webkit-box-sizing: border-box; -moz-box-sizing: border-box; box-sizing: border-box; -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; background: #3f4c6b; background: -webkit-linear-gradient(-45deg, #3f4c6b 0%, #282e44 100%); background: -ms-linear-gradient(-45deg, #3f4c6b 0%, #282e44 100%); background: -o-linear-gradient(-45deg, #3f4c6b 0%, #282e44 100%); background: linear-gradient(135deg, #3f4c6b 0%, #282e44 100%);
}
.container { display: block; clear: both; width: 100%; max-width: 800px; margin: 0 auto;
}
.container .text-box { float: left; width: 100%; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; line-height: 90px; font-family: Arial, sans-serif; font-size: 50px; font-weight: normal; color: rgba(255, 255, 255, 0.25); padding: 20px; position: relative; background: rgba(255, 255, 255, 0.1);
}
.container .image { z-index: 999;
}
.container .lineA,
.container .lineB,
.container .lineC,
.container .lineD,
.container .lineE,
.container .lineF,
.container .lineG,
.container .lineH { position: absolute; left: 0; width: 100%; height: 1px; z-index: 10;
}
.container .lineA { top: 20px; border-top: 1px dashed rgba(255, 255, 255, 0.25);
}
.container .lineB { top: 40px; border-top: 1px dashed rgba(255, 255, 255, 0.5);
}
.container .lineC { top: 129px; border-top: 1px dashed rgba(255, 255, 255, 0.5);
}
.container .lineD { top: 149px; border-top: 1px dashed rgba(255, 255, 255, 0.25);
}
.container .lineE { top: 102px; border-top: 1px dotted #f8b100;
}
.container .lineF { top: 112px; border-top: 1px dashed rgba(255, 255, 255, 0.75);
}
.container .lineG { top: 57px; border-top: 1px dashed rgba(255, 255, 255, 0.75);
}
.container .lineH { top: 65px; border-top: 1px dashed rgba(255, 255, 255, 0.75);
}
.image-controls { display: block; text-align: justify; clear: both; width: 100%; max-width: 800px; margin: 30px auto; line-height: 30px; font-family: Arial, sans-serif; font-size: 20px; font-weight: normal; color: white; padding: 20px; position: relative; top: 30px; background: rgba(255, 255, 255, 0.1);
}
.image-controls p { line-height: 1.2em;
}
.webkit-baseline-middle { vertical-align: -webkit-baseline-middle;
}
.baseline { vertical-align: baseline;
}
.sub { vertical-align: sub;
}
.super { vertical-align: super;
}
.bottom { vertical-align: bottom;
}
.inherit { vertical-align: inherit;
}
.middle { vertical-align: middle;
}
.text-bottom { vertical-align: text-bottom;
}
.text-top { vertical-align: text-top;
}
.top { vertical-align: top;
}
Vertical Align Images - Explained - Script Codes JS Codes
// Vertical Alignment
$(document).ready(function($){ var selectedScheme = 'Default'; $('#img-pos').change(function(){ $('.image').removeClass(selectedScheme).addClass($(this).val()); selectedScheme = $(this).val(); });
});
Developer | Matt Litherland |
Username | mattsince87 |
Uploaded | August 03, 2022 |
Rating | 4 |
Size | 4,610 Kb |
Views | 52,624 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
Responsive Flot Chart | 3,554 Kb |
Animated SVG Path | 3,853 Kb |
Subtle CSS3 Heart Beat | 2,691 Kb |
Node Waves | 3,216 Kb |
SCSS Social Icons Flat | 3,482 Kb |
Wishlist Toggle Button | 3,774 Kb |
Animated Resposnive SVG Path | 5,339 Kb |
Share Your Profile | 3,387 Kb |
Animated CSS3 Mobile Phone | 4,609 Kb |
Gradient over Google Maps | 4,329 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
CSS Variables | Jdsteinbach | 4,759 Kb |
700 Synapses Per Second | Silentkrange | 2,138 Kb |
Freecodecamp - Tribute Page | Samoht513 | 3,583 Kb |
Social Profiles | Lachlanjc | 1,939 Kb |
Flat UI - Checkbox FIX | ARS | 2,663 Kb |
The Rope | Chribbe | 2,886 Kb |
CSS3 Animated buttons | Cguillou | 3,737 Kb |
Button fills | Zubfatal | 5,205 Kb |
Wikipedia Viewer | Thomasvaeth | 2,549 Kb |
Boxes | H3l1um | 2,563 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!