I'm looking to center text vertically in all screen resolutions. Does anyone have suggestions?
I'm looking to center text vertically in all screen resolutions. Does anyone have suggestions?
Take a look at the code snippet below:
.textBox{display: flex;align-items: center;justify-content: center;}
.cont-bx1{background-color:#9f2f1f; color:#ffffff; text-align:center; min-height:200px; font-weight:bold; border: 1px solid #ffffff;}
.cont-bx2{background-color:#ef9030; color:#ffffff; text-align:center; min-height:200px; font-weight:bold; border: 1px solid #ffffff;}
.cont-bx3{background-color:#df6221; color:#ffffff; text-align:center; min-height:200px; font-weight:bold; border: 1px solid #ffffff;}
.cont-bx4{background-color:#df6221; color:#ffffff; text-aligncenter; min-height:200px; font-weight:bold; border: 1px solid #ffffff; }
.cont-bx5{background-color:#9f2f1f; color:#ffffff; text-align:center; min-height:200px; font-weight:bold; border: 1px solid #ffffff;}
.cont-bx6{background-color:#9f2f1f; color:#ffffff; text-align:center; min-height:200px; font-weight:bold; border: 1px solid #ffffff;}
.cont-bx7{background-color:#ef9030; color:#ffffff; text-align:center; min-height:200px; font-weight:bold; border: 1px solid #ffffff;}
.cont-bx8{background-color:#df6221; color:#ffffff; text-align:center; min-height:200px; font-weight:bold; border: 1px solid #ffffff;}
<div class="col-lg-12">
<div class="col-lg-4 cont-bx1 textBox">Lorem ipsum dolor sit amet, consectetur adipiscing elit</div>
<div class="col-lg-4 cont-bx2 textBox">Lorem ipsum dolor sit amet, consectetur</div>
<div class="col-lg-4 cont-bx3 textBox">Lorem ipsum dolor sit amet, consectetur adipiscing</div>
</div>
<div class="col-lg-12">
<div class="col-lg-6 cont-bx4 textBox">Lorem ipsum dolor sit amet, consectetur adipiscing elit</div>
<div class="col-lg-6 cont-bx5 textBox">Lorem ipsum dolor sit amet, consectetur adipiscing</div>
</div>
<div class="col-lg-12">
<div class="col-lg-4 cont-bx6 textBox">Lorem ipsum dolor sit amet, consectetur adipiscing elit</div>
<div class="col-lg-4 cont-bx7 textBox">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do</div>
<div class="col-lg-4 cont-bx8 textBox">Lorem ipsum dolor sit amet</div>
</div>
Flexbox is a powerful tool for aligning items in web design.
display: flex;
align-items: center;
justify-content: center;
To see it in action, check out this complete example on codepen
I recently integrated the audio.js plugin into my website. I've added the necessary code to the header.php file located in the includes folder. <script src="audio/audiojs/audio.min.js"></script> While the player appears correctly on othe ...
I am looking to select all elements that are labeled with the 'tag' class. Once these items have been selected, I would like to remove any items from the list that contain the attribute 'data-tag-cat'. var tags = $('.tag'); c ...
Struggling with this frustrating piece of code for hours now. I've lost nearly 2 hours trying to get it to work properly. My goal is to center an input field vertically and horizontally inside a horizontal bar. Take a look at the simplified code belo ...
.unorder_Hnav,li,.classes:active { background-color:#7CA738; height: 50px; display: table-cell; width: 1024px; text-align: center; line-height: 52px; font-weight: bolder; color: #FFFFFF; background-color: #457025; ...
I am attempting to create a similar banner using bootstrap. You can view the demo of the banner here. https://i.stack.imgur.com/JXLNY.png I'm struggling to understand how to achieve this in bootstrap 3 and where to begin. Should I use rows and colum ...
I managed to successfully set up a user cookie, but I'm having trouble getting it to be destroyed or terminated when the user logs out. Any assistance on this matter would be highly appreciated! I am new to PHP and still in the learning process. Here ...
I am dynamically disabling controls in a reactive form based on specific conditions. I also wish to apply custom styling to those disabled controls. Does Angular automatically add a CSS class or directive to disabled controls? I have not come across any. ...
https://i.stack.imgur.com/emhsT.png When I click on the first "Respond" button, I want the adjacent text box to disappear. Currently, if I click on the first "Respond" button, both text boxes will disappear instead of just the first one. $('.comment ...
Visit this link for the code The text field in the provided link should only be 10px wide but it is currently displaying a width of 152px. Here is the code snippet: .input { width: 100%; box-sizing: border-box; } .cont { padding: 2px; } .main ...
I need help converting strings into an array by removing the "+" characters. Currently, it is only converting the first element and not all of them. Can you assist me in converting all instances of "+" to "," for every element? let myString = 'jan + f ...
According to the W3C specification, the 'transform' attribute consists of a <transform-list>, which is essentially a list of transform definitions that are applied in the specified order. If a list of transforms is provided, each transfor ...
Ensure the dropdown remains open when clicking outside of it. Display and hide dropdown only when button is clicked. Check out the JSFiddle link. <div class="dropdown"> <button class="btn btn-primary dropdown-toggle" type="button" data-toggl ...
(Please note that there are no scrollbars on these divs, so scrolling to the left is not possible within the body or the divs themselves.) The issue (shown above in FF and Opera) occurs on both the "Baroque" and "Spotlights" theme selections (refer to the ...
I am attempting to showcase some Hindi words using JQuery because these are essential contents that need to be displayed on every page of the website. Please note that this is a static website built with HTML and JQuery/JavaScript. Below is my JS file: in ...
Check out this cool code example I created. It's a simple tabs system built using Vue.js. Every tab pulls its content from an array like this: var tabs = [ { title: "Pictures", content: "Pictures content" }, { title: "Music", c ...
The owl carousel items seem to be facing an issue when added dynamically using AJAX and jQuery. Here is the AJAX code snippet, any assistance would be highly appreciated. Thank you in advance! $.ajax({ type: "POST", url: "urllinks", data: &a ...
I am attempting to assign the appropriate class to a group of elements, representing each letter in the alphabet. The elements have IDs ranging from #alpha_0 to #alpha_25. If a letter appears just once in the input, it should be displayed in green. If a le ...
Currently grappling with setting up a Node.js application with a MySQL database to create a basic login functionality. Encountering an issue: Cannot POST /login <body class="hero-image"> <div id="container"> <div ...
Is there a way to position the navigation bar above the chatbot on my website? The following CSS code excerpt is from the "navigation bar css" file: *{ padding: 0; margin: 0; text-decoration: none; list-style: none; box-sizing: border ...
I am working with Material-UI and have implemented a <Table> component. Each dynamically rendered <TableRow> in the <TableBody> needs to include a button (<FlatButton>) within one of the columns. When this button is clicked, a <D ...