Flexbox Vertical Centering in Bootstrap 3

Size
2,269 Kb
Views
20,240

How do I make an flexbox vertical centering in bootstrap 3?

What is a flexbox vertical centering in bootstrap 3? How do you make a flexbox vertical centering in bootstrap 3? This script and codes were developed by Jay Holtslander on 18 October 2022, Tuesday.

Flexbox Vertical Centering in Bootstrap 3 Previews

Flexbox Vertical Centering in Bootstrap 3 - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Flexbox Vertical Centering in Bootstrap 3</title> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/5.0.0/normalize.min.css"> <link rel='stylesheet prefetch' href='http://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css'> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div class="container-fluid"> <div class="row"> <div class="col-xs-5 col-xs-offset-1 v-center-640"> <h1>Flexbox Vertical Centering</h1> <p class="lead">An example in Bootstrap 3</p> <p>With a known height, a single flex-child can be made to center in a flex-parent pretty easily.</p> </div> <div class="col-xs-6 v-center-640"> <img src="http://placehold.it/640x420/8866ba/563d7c" class="img-responsive pull-right"> </div> </div>
</div>
</body>
</html>

Flexbox Vertical Centering in Bootstrap 3 - Script Codes CSS Codes

.v-center-640 { display: -webkit-box; display: -ms-flexbox; display: flex; -webkit-box-pack: center; -ms-flex-pack: center; justify-content: center; -webkit-box-orient: vertical; -webkit-box-direction: normal; -ms-flex-direction: column; flex-direction: column; height: 420px;
}
body { background-color: #563d7c;
}
h1 { font-size: 3vw;
}
h1,
h2,
h3 { color: #fff; margin-top: 0px;
}
h1 small,
h2 small,
h3 small { color: rgba(255, 255, 255, 0.5);
}
.lead { font-size: 2vw; color: rgba(255, 255, 255, 0.75);
}
p { font-size: 1.5vw; color: rgba(255, 255, 255, 0.5);
}
Flexbox Vertical Centering in Bootstrap 3 - Script Codes
Flexbox Vertical Centering in Bootstrap 3 - Script Codes
Home Page Home
Developer Jay Holtslander
Username j_holtslander
Uploaded October 18, 2022
Rating 3
Size 2,269 Kb
Views 20,240
Do you need developer help for Flexbox Vertical Centering in Bootstrap 3?

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!

Jay Holtslander (j_holtslander) Script Codes
Create amazing SEO content 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!