Vertical-align-vertical-height

Developer
Size
2,232 Kb
Views
12,144

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 Previews

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;
}
Vertical-align-vertical-height - Script Codes
Vertical-align-vertical-height - Script Codes
Home Page Home
Developer Rich Wertz
Username richwertz
Uploaded January 29, 2023
Rating 3
Size 2,232 Kb
Views 12,144
Do you need developer help for Vertical-align-vertical-height?

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!

Rich Wertz (richwertz) Script Codes
Create amazing love letters with AI!

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!