creating three dots vertically with span and align them - html

I'm trying to create three vertical dots and align the bottom left of my container with css and bootstrap 5. exactly like the pic below:
my HTML and CSS:
.dot {
border-radius: 50%;
height: 12px;
width: 12px;
background: linear-gradient(90deg, #76b3fe, #8680e4);
}
.selected-dot {
height: 20px;
width: 20px;
background: #97cdfe;
}
<section class="slider-bg-1 d-flex align-items-end">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-5 d-flex flex-column justify-content-center pt-4 pt-lg-0 order-2 order-lg-1">
<h1 class="head-font-size">Choose a powerful design for your Start-up</h1>
<h6 claas="caption-text-color">Get your freebie template now</h6>
<div class="d-lg-flex">
<div class="mt-5"><button class="my-btn" type="submit">Discover</button></div>
</div>
</div>
<div class="col-lg-5 col-md-12 col-sm-12 order-1 order-lg-2 d-flex justify-content-center">
<img src="Assets/home-slider/slider-m-1.png" class="img-fluid img-slider" alt="">
</div>
</div>
</div>
<span class="dot selected-dot"></span>
<span class="dot"></span>
<span class="dot"></span>
</section>
this is my output
how can i align the vertically and move them to bottom left of container? because when i use div for wrapping they disappear

1st: wrap the dots in a container. I used a section with the class: .dot-wrapper.
2nd: give the wrapper a width: min-content;. With that, it will only be as wide as the seclected dot.
3rd: to cenetr the dots, give them a margin left and right of auto;
.dot {
border-radius: 50%;
height: 12px;
width: 12px;
background: linear-gradient(90deg, #76b3fe, #8680e4);
margin: 5px auto;
}
.selected-dot {
height: 20px;
width: 20px;
background: #97cdfe;
}
.dot-wrapper {
width: min-content;
}
<section class="slider-bg-1 d-flex align-items-end">
<div class="container">
<div class="row justify-content-center">
<div class="col-lg-5 d-flex flex-column justify-content-center pt-4 pt-lg-0 order-2 order-lg-1">
<h1 class="head-font-size">Choose a powerful design for your Start-up</h1>
<h6 claas="caption-text-color">Get your freebie template now</h6>
<div class="d-lg-flex">
<div class="mt-5"><button class="my-btn" type="submit">Discover</button></div>
</div>
</div>
<div class="col-lg-5 col-md-12 col-sm-12 order-1 order-lg-2 d-flex justify-content-center">
<img src="Assets/home-slider/slider-m-1.png" class="img-fluid img-slider" alt="">
</div>
</div>
</div>
<section class="dot-wrapper">
<div class="dot selected-dot"></div>
<div class="dot"></div>
<div class="dot"></div>
</section>
</section>

it's quite easy, you can wrap the dots with a div container like this
<!--Column Dots -->
<div class="dot-container">
<span class="dot selected-dot"></span>
<span class="dot"></span>
<span class="dot"></span>
</div>
and style the container as below
.dot-container{
width: 15px;
display: flex;
flex-direction:column;
align-items:center;
}
and for better styling. give dot class some amrgin like margin: 3px 0;
here is a codpen : https://codepen.io/shammlo/pen/QWKggNX?editors=1100

Related

Icon and Text Vertical alignment css

<div class="container-fluid" >
<section id="current-weather">
<div class="card text-center text-white bg-dark mb-3 " style="width: 60%;">
<div class="card-header">
weather
</div>
<div class="card-body">
<h2>{{location}}</h2>
<hr style="width: 30%;height: 2px; margin: 20px auto 20px auto;color: black;">
<h5 class="card-title"><i class="wi wi-owm-{{weather_current['weather'][0]['id']}}" style="font-size: 2.2em;"></i>{{weather_current['temp']}}°C</h5>
</div>
</div>
</section>
</div>
I have a problem with alignment text and icon. Look at screenshot
I've already tried to use vertical-align: middle and baseline. Maybe somebody can resolve my problem.
Here I have aligned it vertically and horizontally.
.container-fluid{
margin: 0;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
text-align: center;
width: 60%;
}
<div class="container-fluid" >
<section id="current-weather">
<div class="card text-center text-white bg-dark mb-3">
<div class="card-header">
weather
</div>
<div class="card-body">
<h2>{{location}}</h2>
<hr style="width: 30%;height: 2px; margin: 20px auto 20px auto;color: black;">
<h5 class="card-title"><i class="wi wi-owm-{{weather_current['weather'][0]['id']}}" style="font-size: 2.2em;"></i>{{weather_current['temp']}}°C</h5>
</div>
</div>
</section>
</div>
Thanks and best regards!
I really appreciate your work, but I was asking to align icon and text in one line not the whole container on web page.
Check this image
Finally I coped with that. Here is my solution:
.align-inline {
display: flex;
align-items: center;
justify-content: center;
}
<div class="container-fluid" >
<section id="current-weather">
<div class="card text-center text-white bg-dark mb-3">
<div class="card-header">
weather
</div>
<div class="card-body">
<h2>{{location}}</h2>
<hr style="width: 30%;height: 2px; margin: 20px auto 20px auto;color: black;">
<h5 class="card-title align-inline"><i class="wi wi-owm-{{weather_current['weather'][0]['id']}}" style="font-size: 2.2em;"></i>{{weather_current['temp']}}°C</h5>
</div>
</div>
</section>
</div>
This is how result looks like

Remove distance Display:Flex

I'm trying to get a navigation that pushes both div containers on the right side, under the navigation when you go into smartphone view. I try it with Display:flex
however I get this spacing left and right. How can I get rid of that
.container-div {
display: flex;
width: 500px;
background-color: rgb(176, 243, 221);
}
.container-div div {
flex-basis: 50%;
}
<div class="container-div">
<div class="col-md-2 d-flex justify-content-center header-phone">
<i class="fa fa-phone fa-3x"></i>
<div class="col text-center ">
<h5>Rufen Sie uns an</h5>
<h5>+49 7433 2106989</h5>
</div>
</div>
<div class="col-md-2 d-flex justify-content-center header-mail">
<h5 class="col-4 d-flex justify-content-center text-center">Kontakt</h5>
</div>
</div>
</div>

Issue in text alignment in grid items

I have an issue with text I need to separate text and money part and also have to align text in such a way that whenever I view in smaller text the money part to to next line
.adventure-card {
display:flex;
flex-wrap: wrap;
width: 100%;
height:auto;
justify-content:center;
align-items: center;
border-radius: 10px 10px 10px 10px;
position:relative;
line-height: 1.7;
}
.adventure-card img {
/* TODO: MODULE_ADVENTURES_GRID */
/* 1. Fill in the required properties. */
width: 100%;
height: 25vh;
border-radius: 10px 10px 0px 0px;
}
<div class="container">
<div class="content">
<!-- TODO: MODULE_ADVENTURES_GRID -->
<!-- 1. Create the grid of adventures by adding child elements as required. -->
<div class = "row">
<div class="col-6 col-sm-6 col-lg-3 mb-4 d-flex align-items-stretch px-md-4">
<a href = "resort/index.html">
<div class = "adventure-card border bg-light">
<div class = "adventure-card img-responsive">
<img src ="/assets/adventures/resort.jpg" alt = "tower.jpg">
</div>
<p>Resort</p>
<p>₹1,200 </p>
</div>
</a>
</div>
</div>
<div class="col-6 col-sm-6 col-lg-3 mb-4 d-flex align-items-stretch px-md-4">
<div class = "adventure-card border bg-light">
<div class = "adventure-card img-responsive">
<img src ="/assets/adventures/mount.jpg" alt = "Skiing.jpg">
</div>
<p> Skiing</p>
<p>₹1,900 </p>
</div>
</div>
</div>
<div class = "row">
<div class="col-6 col-sm-6 col-lg-3 mb-4 d-flex align-items-stretch px-md-4">
<div class = "adventure-card border bg-light">
<div class = "adventure-card img-responsive">
<img src ="/assets/adventures/canopy.jpg" alt = "tower.jpg">
</div>
<p>Canopy</p>
<p>₹1,800 </p>
</div>
</div>
<div class="col-6 col-sm-6 col-lg-3 mb-4 d-flex align-items-stretch px-md-4">
<div class = "adventure-card border bg-light">
<div class = "adventure-card img-responsive">
<img src ="/assets/adventures/beachside.jpg" alt = "canopy.jpg">
</div>
<p mb-0>Beach Getaway</p>
<p>₹2,200 </p>
</div>
</div>
</div>
</div>
</div>
Could anyone help me out? The text and money part is centered which is as expected but unable to separate text and money part
Please refer to my code which is added below, is there any doubt the please let me know.
<div class="adventure-card border bg-light">
<div class="adventure-card img-responsive">
<img src="/assets/adventures/resort.jpg" alt="tower.jpg" />
</div>
<div class="text-center">
<h5 mb-0>resort</h5>
<span>₹1,200</span>
</div>
</div>
Use this:
<p style="padding-left:20px">₹1,200 </p>
add inline CSS with you currency P tag.
Add "flex-direction: column;" to your CSS:
.adventure-card {
display:flex;
flex-wrap: wrap;
width: 100%;
height:auto;
justify-content:center;
align-items: center;
border-radius: 10px 10px 10px 10px;
position:relative;
line-height: 1.7;
flex-direction: column;
}

Boostrap grid height and placing row with height: auto

I am doing a simple page with a bootstrap grid and I am having some problems with placing the middle row occupying the full height in the middle.
These are the 3 rows: page
I want to place the row with the logo in the middle, but I am having problems with it. I placed height: 100%;, height: auto;. I even placed the container height to 100% and auto and nothing works!
I think there is a concept about bootstrap heigh that I am missing, because its the heigh that I have problems
html:
<div class="container-fluid">
<div class="row">
<div class="col-md-1 col-2">
<img id="menuIcon" (click)="toggleRightSidenav()" onmouseover="this.src='../../../assets/Images/generic/menuIcon_hover.png'" src="/assets/Images/generic/menuIcon.png" onmouseout="this.src='/assets/Images/generic/menuIcon.png'">
</div>
<div class="col-md-10 col-8">
</div>
<div class="col-md-1 col-2">
<img id="helpIcon" routerLink="/guide" onmouseover="this.src='../../../assets/Images/home/helpIconHover.png'" src="/assets/Images/home/helpIcon.png" onmouseout="this.src='/assets/Images/home/helpIcon.png'">
</div>
</div>
<div class="row row align-items-center mh-100" >
<div class= "col-md-12">
<img id="logo" src="/assets/Images/home/Logo.png">
</div>
</div>
<div class="row align-items-center justify-content-around fixed-bottom">
<div class="col-md-2 col-sm-2">
<img id="addButton" routerLink="/addPlayer" onmouseover="this.src='../../../assets/Images/generic/addIcon_hover.png'" src="../../../assets/Images/generic/addIcon.png" onmouseout="this.src='/assets/Images/generic/addIcon.png'" />
</div>
<div class="col-md-2 col-sm-2">
<p>Players Waiting: {{playerWaiting}} </p>
</div>
<div class="col-md-2 col-sm-2">
<p>Listed Players: {{playersListed}}</p>
</div>
<div class="col-md-2 col-sm-2">
<img id="searchButton" routerLink="/search" onmouseover="this.src='../../../assets/Images/generic/searchIcon_hover.png'" src="../../../assets/Images/generic/searchIcon.png" onmouseout="this.src='/assets/Images/generic/searchIcon.png'" />
</div>
</div>
</div>
css:
div{
border: yellow 1px solid;
}
#menuIcon{
width: 100%;
height: auto;
}
#helpIcon{
width: 100%;
height: auto;
}
#addButton{
width: 100%;
height: auto;
max-width: 127px;
}
#searchButton{
width: 100%;
height: auto;
max-width: 127px;
}
https://www.codeply.com/p/Xd0xi5hFNc
Couple of things.
To be able to fill several rows, you'd need a height for the container div.
Current HTML
<div class="container-fluid">
Update as
<div class="container-fluid d-flex vh-100 flex-column">
Now you can easily make your middle div fill the remaining gap by adding a fill-height class.
Current HTML
<div class="row row align-items-center mh-100" >
Update as
<div class="row row align-items-center fill-height">
Add this to your css
.fill-height {
flex: 1;
}
.fixed-bottom {
position: sticky;
}
jsFiddle

html flexbox 2 elements vertical and one on the left [duplicate]

This question already has answers here:
Left column and stacked right column using flexbox CSS [duplicate]
(2 answers)
Closed 2 years ago.
I am totally lost with flexbox for css3, and I cannot seem to figure out how to get it correctly working :(.
I want a layout like:
|-----| |----|
------- |----|
|-----| |----|
(Where |----| on the left are 2 divs an on the right its one)
And on mobile I want the right div to below the other 2 divs...
And I cannot seem to figure it out.
It just will not line up correctly, or the 2 divs on the left will not be as large as the one on the right.
I am using bootstrap 4.0 for this... so maybe that is something?
The following code I am currently at:
There is a container div around it
<div id="container">
<div class="d-flex row">
<div class="flex-row flex-fill">
<div class="d-flex flex-column">
<div class="card d-flex flex-fill">
<div class="card-body">
<form>
<div class="form-group">
<label>xxx</label>
<input type="text" class="form-control date" id="birthdatepicker" data-toggle="daterangepicker" data-single-date-picker="true">
</div>
<button type="submit" class="btn btn-primary waves-effect waves-light">{{ __('Submit') }}</button>
</form>
</div>
</div>
<div class="card d-flex flex-fill mb-4 mb-md-0">
<div class="card-body">
<h4 class="card-title">{{ __('Progress') }}</h4>
<div class="progress mb-2">
<div class="progress-bar bg-success" role="progressbar" style="width: 25%" aria-valuenow="25" aria-valuemin="0" aria-valuemax="100"></div>
</div>
</div>
</div>
</div>
</div>
<div class="flex-row col-12 col-md-4 col-lg-2">
<div class="d-flex flex-fill card mb-4 mb-md-0">
<div class="card-body">
<h5>xx</h5>
<p>
xx
</p>
</div>
</div>
</div>
</div>
</div>
here is a simple example of what i think you wish to achive.
.flexbox{
display: flex;
flex-direction: row;
width: 400px;
height: 400px;
}
#media only screen and (max-width: 478px){
.flexbox{
flex-direction: column;
}
}
.left{
width: 50%;
height: 100%;
}
.top-left{
height: 50%;
width: 100%;
position: relative;
background: red;
}
.bottom-left{
height: 50%;
width: 100%;
position: relative;
background: green;
}
.right{
width:50%;
height:100%;
}
.center-right{
width: 100%;
height: 100%;
background: blue;
}
<div class="flexbox">
<div class="left">
<div class="top-left">
</div>
<div class="bottom-left">
</div>
</div>
<div class="right">
<div class="center-right">
</div>
</div>
</div>