Vertical-align-vertical-height
How do I make an vertical-align-vertical-height?
Vertically align text in a box that is vertical.. What is a vertical-align-vertical-height? How do you make a vertical-align-vertical-height? This script and codes were developed by Rich Wertz on 29 January 2023, Sunday.
Vertical-align-vertical-height - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>vertical-align-vertical-height</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <h1>Vertical center with only 3 lines of CSS</h1>
<div class="wrapper">
<section class="text"> <h2>Text</h2> <p>I'm vertically aligned! Wubba Lubba Dub Dub!</p></section>
<section class="image"> <h2>Images</h2> <img src="https://placeholdit.imgix.net/~text?txtsize=33&txt=120%C3%9770&w=120&h=70"></section>
<section class="block-of-text"> <h2>Block of text</h2> <p> I'm a block of text! Lorem ipsum dolor sit amet, consectetur adipisicing elit. At quia doloremque tempora placeat officia ex obcaecati tenetur deserunt repudiandae praesentium.</p>
</section>
</div>
</body>
</html>
Vertical-align-vertical-height - Script Codes CSS Codes
@import url(https://fonts.googleapis.com/css?family=Roboto:400,300,700,100);
.text p { position: relative; top: 50%; -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); transform: translateY(-50%);
}
.image img { position: relative; top: 50%; -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); transform: translateY(-50%);
}
.block-of-text p { position: relative; top: 50%; -webkit-transform: translateY(-50%); -ms-transform: translateY(-50%); transform: translateY(-50%);
}
/* ==================================== Base styling, to make the demo more fancy ==================================== */
body { font-family: Roboto, sans-serif; background: #2C3D51; padding: 1em; -webkit-font-smoothing: antialiased;
}
h1 { text-align: center; color: white; font-weight: 300; margin: 0.5em 0 1em 0;
}
h2 { text-transform: uppercase; margin: 0; font-size: 16px; position: absolute; top: 5px; right: 5px; font-weight: bold; color: #ECF0F1;
}
section { display: block; max-width: 500px; background: #E74C3C; margin: 0 auto 1em; height: 150px; border-radius: .2em; color: white; -webkit-transform-style: preserve-3d; -moz-transform-style: preserve-3d; transform-style: preserve-3d;
}
@media { width: 620px; { section { height: 90px; } }
}
section img, section p { padding: 1em; margin: 0;
}
.block-of-text { height: 220px;
}
.read-more { text-align: center; color: white; font-size: 12px; margin-top: 3em;
}
.read-more a { text-decoration: none; color: #E74C3C;
}
Developer | Rich Wertz |
Username | richwertz |
Uploaded | January 29, 2023 |
Rating | 3 |
Size | 2,232 Kb |
Views | 12,144 |
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 |
Dynamic Animated Effect | 1,844 Kb |
Transitioning Backgrounds | 2,099 Kb |
Shivering Text Effect for Navigation | 1,607 Kb |
Hamburger Menu Animation | 1,827 Kb |
Animated Menu Effect | 1,940 Kb |
Slide-Screen Navigation | 2,039 Kb |
Video-background | 2,002 Kb |
Image Slide In Effect | 1,989 Kb |
SCSS basics | 1,824 Kb |
Animated Title Effect | 1,860 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 |
Codero Sitemap | S1m0ne | 28,169 Kb |
Flexbox Test | Icutpeople | 2,486 Kb |
Random Gradients - JS | Aldlevine | 2,026 Kb |
TweenMax transformOrigin Bubble | Nicolund | 2,209 Kb |
SlideDown FixedMenu | Mp_graphic | 5,602 Kb |
Prism | Pyrografix | 2,843 Kb |
Responsive Menu I | Rodericksandoval | 3,045 Kb |
Drifting Clouds | Benedikte | 2,247 Kb |
CSS3 iPad | Vikvarg | 1,766 Kb |
Nested flexbox layout for library catalog | Boycetrus | 3,271 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!