Getting rid of a list in a row - html

I'm trying to get rid of a bullet point in a row, but for some reason the first one is gone but the other is not.
I just want the email and phone to be side by side with no list.
.get_in {
list-style: none;
}
<div class="row">
<div class="col-md-6">
<ul class="get_in">
<li><i class="fa fa-envelope-o"></i>
<p>111111#hotmail.com</p>
</li>
</div>
<div class="col-md-6">
<li><i class="fa fa-phone"></i>
<p>(+41) 11111111</p>
</li>
</ul>
</div>
</div>

Just some messed up HTML. Close your first ul, create another for the second list and give the same class name.
.get_in {
list-style: none;
}
<div class="row">
<div class="col-md-6">
<ul class="get_in">
<li><i class="fa fa-envelope-o"></i>
<p>111111#hotmail.com</p>
</li>
</ul>
</div>
<div class="col-md-6">
<ul class="get_in">
<li><i class="fa fa-phone"></i>
<p>(+41) 11111111</p>
</li>
</ul>
</div>
</div>

Your HTML is invalid, and your browser is attempting to fill in the holes. If you inspect the actual rendered HTML in your browser's developer tools, you'll most likely see:
<div class="row">
<div class="col-md-6">
<ul class="get_in">
<li><i class="fa fa-envelope-o"></i><p>111111#hotmail.com</p></li>
</ul>
</div>
<div class="col-md-6">
<li><i class="fa fa-phone"></i><p>(+41) 11111111</p></li>
</div>
</div>
Note that in the second column the li is not wrapped with a ul, which is why your CSS rule does not apply.
I just want the email and phone to be side by side with no list
If this is the case, then don't use a list:
<div class="row">
<div class="col-md-6">
<i class="fa fa-envelope-o"></i> 111111#hotmail.com
</div>
<div class="col-md-6">
<i class="fa fa-phone"></i> (+41) 11111111
</div>
</div>

First, let's put your ul tag which opens, under the first div tag.
Second, let's put your ul tag which closes, between the last div and before the last div tags.
<div class="row">
<ul class="get_in">
<div class="col-md-6">
<li><i class="fa fa-envelope-o"></i><p>111111#hotmail.com</p></li>
</div>
<div class="col-md-6">
<li><i class="fa fa-phone"></i><p>(+41) 11111111</p></li>
</div>
</ul>
</div>

You can't open a ul element in one div and then close it in another div.
This is your HTML:
<div class="row">
<div class="col-md-6">
<ul class="get_in">
<li><i class="fa fa-envelope-o"></i><p>111111#hotmail.com</p></li>
</div>
<div class="col-md-6">
<li><i class="fa fa-phone"></i><p>(+41) 11111111</p></li>
</ul>
</div>
</div>
Change your HTML to:
<div class="row">
<div class="col-md-6">
<ul class="get_in">
<li><i class="fa fa-envelope-o"></i><p>111111#hotmail.com</p></li> </ul>
</div>
<div class="col-md-6">
<ul>
<li><i class="fa fa-phone"></i><p>(+41) 11111111</p></li>
</ul>
</div>
</div>
I hope that this has helped you.

Related

Html CSS footer alignment

I have developed a site on angular. All things are working fine. Now I want to adjust the footer.
Actual Footer
Expected Footer
Code
<footer>
<div class="row">
<div class="col-12">
<img src="../../assets/img/logo.svg" alt="" class="img-fluid" />
</div>
<div class="col-md-3 col-12">
<p>
<b>Manufactured by:</b>
</p>
</div>
<div class="col-md-2 col-6 mt-lg-0 mt-3">
<ul class="nav-menu">
<li>
<a [routerLink]="['/']">Home</a>
</li>
<li>
About us
</li>
<li>
Faqs
</li>
<li>
<a [routerLink]="['/latest-recipes']">recipes</a>
</li>
<li>
<a [routerLink]="['/stores']">Stores</a>
</li>
<!-- <li>
<a [routerLink]="['/where-to-buy']">where to buy</a>
</li> -->
</ul>
</div>
<div class="col-md-2 col-6 mt-lg-0 mt-3">
<ul class="px-0">
<li>Privacy & Policy</li>
<li>Terms & Condition</li>
</ul>
</div>
<div class="col-md-3 col-12">
<h1>Karachi Office</h1>
<p></p>
<h1>Lahore Office</h1>
<p></p>
<div class="social-icon d-flex align-items-center">
<i class="fab fa-facebook-f"></i>
<i class="fab fa-twitter"></i>
<i class="fab fa-instagram"></i>
</div>
</div>
<div class="col-md-2 col-12">
<img src="../../assets/img/ebs.png" class="img-fluif" />
</div>
</div>
</footer>
How can I align the footer? Any help would be highly appreciated.
You've made the image col-12 which will make the image spread across the full container. Remember that in bootstrap each container is split into 12, so saying that the image covers col-12 will cover all of them. From the looks of it you want to try around col-2.
Alternatively you could achieve the same without Bootstrap. Put the logo/manufactured by links in one div and float them left. Place the rest of the content in another div and float them right.
Add and Remover mt-3(margin-top) from the div.

Icons will not align with the text element

I'm creating an account page (header) for the first time, and I notice that some of the icons will not align perfectly with the text. I know how simple and easy this is for advanced developers, but I'm just starting off and really need some advice.
I have tried using padding and margin as a style element but didn't work.
<header>
<div class="container">
<div class="row">
<div class="col-xs-6 col-md-8">
<div class="row">
<div class="col-sm-3">
<img src="paylocity_logo.png" alt="logo" style="width:100%"S/></a>
</div>
<div class="col-sm-9 hidden-sm hidden-xs" id="project-details">
<a class="home-link" href="" title="Edit"> <i class="material-icons"> home </i> </a>
<div class="project">
User Profile
</div>
</div>
</div>
</div>
<div class="col-xs-6 col-md-4 text-right" id="account">
<i class="material-icons">account_circle</i> <span>Tom Markart </span>
<div id="account-options">
<ul>
<li>
<span> <i class="material-icons">account_circle</i></span>View Profile
</li>
<li>
<span class="fa fa-cog"></span>Settings
</li>
<li>
<span class="fa fa-bug"></span>Report a Bug
</li>
<li>
<span class="fa fa-power-off"></span>Log Out
</li>
</ul>
</div>
</div>
</div>
</header>
I want to make them straight.
In your case, you can add the following rule:
.material-icons {
vertical-align: middle;
}
https://codepen.io/anon/pen/EBBbpd
Using flex:
Wrap text in <span> and a wrapper class to <a>.
...
<li>
<a class='wrapper' href="javascript:void(0);">
<span class="fa fa-cog"></span>
<span>Settings</span>
</a>
</li>
...
.wrapper {
display: flex;
align-items: center
}

display UL LI items "inline" in a bootstrap row

I'm having a hard time working with UL LI items in a bootstrap set up. I'm trying to align them so that there are next to each other (horizontal) rather than being aligned vertically. Here's my bode:
<div class="container-fluid" style="margin-bottom:45px;">
<div class="row text-center">
<div class="col-lg-12">
<h4 class="text-center">FOLLOW US</h4>
<hr style="width:60%">
</div>
</div>
<div class="row ">
<div class="col-lg-12 d-flex justify-content-around" id="socialMedia">
<ul style="list-style:none;">
<li><i class="fab fa-facebook-f"></i></li>
<li><i class="fab fa-instagram"></i></li>
<li><i class="fab fa-yelp"></i></li>
</ul>
</div>
</div>
</div>
but i have not been able to get it to align horizontally. I tried to apply CSS to #socialMedia, like Float:left, display:inline but it's not working.
Right now they are positioned in dead center, and that's how I want them to stay.
Does anyone have any idea?
Use the d-inline class...
<ul class="list-unstyled">
<li class="d-inline"><i class="fab fa-facebook-f"></i></li>
<li class="d-inline"><i class="fab fa-instagram"></i></li>
<li class="d-inline"><i class="fab fa-yelp"></i></li>
</ul>
https://www.codeply.com/go/DaDD3njGFz
You said you applied the float to #socialMedia but that's the ul. You have to apply float: left on the lis. Add the float: left to #socialMedia li.
(If that still doesn't work, you have to make sure you have enough specificity to override Bootstrap. Last resort, add !important).

Thumbnail image is not fitting the entire column when resizing

I have included a sidebar in one column and 3 thumbnails in another 3 columns in a row. The thumbnail image is fitting the entire columns at first but when I resize the thumbnail images are getting smaller keeping the column in full width (as for usual bootstrap responsive works). I need to stretch my images as that of the column they are filled in.
Here's my HTML:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container-fluid side-navigation-bar">
<div class="row">
<!--==========================================-->
<!--Side navigation bar-->
<!--==========================================-->
<div class="col-md-3 col-md-3-thumbnail">
<div class="nav-side-menu" >
<div class="brand"><i class="fa fa-heartbeat"> myVitals.com</i></div>
<i class="fa fa-bars fa-2x toggle-btn" data-toggle="collapse" data-target="#menu-content"></i>
<div class="menu-list" >
<ul id="menu-content" class="menu-content collapse out" >
<li>
<a href="#">
<i class="fa fa-home fa-lg fa-fw"></i> Home
</a>
</li>
<li>
<a href="#">
<i class="fa fa-book fa-lg fa-fw"></i> My Appointments
</a>
</li>
<li>
<a href="#">
<i class="fa fa-s15 fa-lg fa-fw"></i> Facilities
</a>
</li>
<li>
<i class="fa fa-cogs fa-lg fa-fw"></i> Services
</li>
<li>
<i class="fa fa-stethoscope fa-lg fa-fw"></i> Doctors
</li>
<li>
<a href="#">
<i class="fa fa-medkit fa-lg fa-fw"></i> Medications
</a>
</li>
<li>
<a href="#">
<i class="fa fa-medkit fa-lg fa-fw"></i> Medications
</a>
</li>
</ul>
</div>
</div>
</div>
<!--==========================================-->
<!--End of Side navigation bar-->
<!--==========================================-->
<!--==========================================-->
<!--Cards-->
<!--==========================================-->
<div id="column" class="col-md-3 col-sm-6 col-md-3-thumbnail text-center">
<div class="thumbnail">
<figure class="imghvr-hinge-down">
<img src="http://via.placeholder.com/320x211" alt="Bootstrap Thumbnail Customization">
</figure>
<div class="caption">
<h5><b>Bootstrap Cards Design</b></h5>
<p class="card-description">Hi there How are you?</p>
<p>Read More</p>
</div>
</div>
</div>
<div id="column" class="col-md-3 col-sm-6 col-md-3-thumbnail text-center">
<div class="thumbnail">
<figure class="imghvr-hinge-down">
<img src="http://via.placeholder.com/320x211" alt="Bootstrap Thumbnail Customization">
</figure>
<div class="caption">
<h5><b>Bootstrap Cards Design</b></h5>
<p class="card-description">Hi there How are you?</p>
<p>Read More</p>
</div>
</div>
</div>
<div id="column" class="col-md-3 col-sm-6 col-md-3-thumbnail text-center">
<div class="thumbnail">
<figure class="imghvr-hinge-down">
<img src="http://via.placeholder.com/320x211" alt="Bootstrap Thumbnail Customization">
</figure>
<div class="caption">
<h5><b>Bootstrap Cards Design</b></h5>
<p class="card-description">Hi there How are you?</p>
<p>Read More</p>
</div>
</div>
</div>
</div>
</div>
I even tried the width:100% for the thumbnail image as
.thumbnail > img{width:100%; display:block;}
The problem is, the img is not taking the full-width as that of its column
Can anyone please help me???
Used .img-fluid for responsive image in Bootstrap.4. it have following css:
.img-fluid {
max-width: 100%;
height: auto;
}
https://getbootstrap.com/docs/4.0/content/images/
You can just set the width to 100% and the height to auto, this will expand it to full width.
CSS:
.thumbnail > figure > img {
width: 100%;
height: auto;
}
JSFiddle Demo

How to show correctly a single <UL> inside a ROW class in Boostrap

I am creating a web page where i want to show multiple rows of images. I am using Bootstrap 3.3.7 and have the following code. What is happening is that when using a col-md3, the last images are not show correctly. I want to have them in the same row, starting from left to right, but they are in the middle of the row or some other position.
<div class="staff-picked-posts padding-top-70 background-color-gray padding-bottom-40" id="chennal-page">
<div class="container">
<div class="tab-content">
<div class="slide tab-pane active" id="l">
<div class="">
<div class="item active">
<div class="row">
<ul class="staff-picked-videos">
<li class="col-md-3 col-sm-4 col-xs-12">
<div class="post-details">
<div class="overlay-inner-image">
<img src="https://i.ytimg.com/vi/o3Kbc-LSGvI/hqdefault.jpg" alt="">
<a a="" class="inner-image-overlay" href="/Home/Detail/41/these-athletes-are-incredibly-angry-want-to-check-out-their-reactions"></a>
<div class="watch-icon" data-toggle="tooltip" title="" data-original-title="Watch Later">
<i class="fa fa-clock-o" aria-hidden="true"></i>
</div>
</div>
<div class="image-content background-color-light-green">
<h3>These athletes are incredibly angry. Want to check out their reactions?</h3>
<!--<p>kocco.co<i class="fa fa-check-circle-o trending-post"></i></p>-->
<p class="margin-bottom-0">4/30/2017 <span><i class="fa fa-eye"></i> 0 </span><i class="fa fa-thumbs-o-up"></i> 0</p>
</div>
</div>
</li>
<li class="col-md-3 col-sm-4 col-xs-12">
<div class="post-details">
<div class="overlay-inner-image">
<img src="https://i.ytimg.com/vi/H2EXKlJ0pfI/hqdefault.jpg" alt="">
<a a="" class="inner-image-overlay" href="/Home/Detail/44/most-shocking-boxing-moments-want-to-check"></a>
<div class="watch-icon" data-toggle="tooltip" title="" data-original-title="Watch Later">
<i class="fa fa-clock-o" aria-hidden="true"></i>
</div>
</div>
<div class="image-content background-color-light-green">
<h3>Most Shocking Boxing moments. Want to check? </h3>
<!--<p>kocco.co<i class="fa fa-check-circle-o trending-post"></i></p>-->
<p class="margin-bottom-0">4/30/2017 <span><i class="fa fa-eye"></i> 0 </span><i class="fa fa-thumbs-o-up"></i> 0</p>
</div>
</div>
</li>
<li class="col-md-3 col-sm-4 col-xs-12">
<div class="post-details">
<div class="overlay-inner-image">
<img src="https://i.ytimg.com/vi/3jT_q7dt-cM/hqdefault.jpg" alt="">
<a a="" class="inner-image-overlay" href="/Home/Detail/45/top-10-crazy-moments-in-sports"></a>
<div class="watch-icon" data-toggle="tooltip" title="" data-original-title="Watch Later">
<i class="fa fa-clock-o" aria-hidden="true"></i>
</div>
</div>
<div class="image-content background-color-light-green">
<h3>Top 10 Crazy Moments in Sports </h3>
<!--<p>kocco.co<i class="fa fa-check-circle-o trending-post"></i></p>-->
<p class="margin-bottom-0">4/30/2017 <span><i class="fa fa-eye"></i> 0 </span><i class="fa fa-thumbs-o-up"></i> 0</p>
</div>
</div>
</li>
<li class="col-md-3 col-sm-4 col-xs-12">
<div class="post-details">
<div class="overlay-inner-image">
<img src="https://i.ytimg.com/vi/RvklO0O3BcY/hqdefault.jpg" alt="">
<a a="" class="inner-image-overlay" href="/Home/Detail/46/top-20-funny-moments-in-soccer"></a>
<div class="watch-icon" data-toggle="tooltip" title="" data-original-title="Watch Later">
<i class="fa fa-clock-o" aria-hidden="true"></i>
</div>
</div>
<div class="image-content background-color-light-green">
<h3>Top 20 funny moments In Soccer </h3>
<!--<p>kocco.co<i class="fa fa-check-circle-o trending-post"></i></p>-->
<p class="margin-bottom-0">4/30/2017 <span><i class="fa fa-eye"></i> 0 </span><i class="fa fa-thumbs-o-up"></i> 0</p>
</div>
</div>
</li>
<li class="col-md-3 col-sm-4 col-xs-12">
<div class="post-details">
<div class="overlay-inner-image">
<img src="https://i.ytimg.com/vi/_c55cW6UGP0/hqdefault.jpg" alt="">
<a a="" class="inner-image-overlay" href="/Home/Detail/50/ronaldinho-making-amazing-plays-in-soccer"></a>
<div class="watch-icon" data-toggle="tooltip" title="" data-original-title="Watch Later">
<i class="fa fa-clock-o" aria-hidden="true"></i>
</div>
</div>
<div class="image-content background-color-light-green">
<h3>Ronaldinho making amazing plays in soccer. </h3>
<!--<p>kocco.co<i class="fa fa-check-circle-o trending-post"></i></p>-->
<p class="margin-bottom-0">4/30/2017 <span><i class="fa fa-eye"></i> 0 </span><i class="fa fa-thumbs-o-up"></i> 0</p>
</div>
</div>
</li>
</ul>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
EDIT 1:
ANSWER THANKS TO Shariqkhan
/*screen-sm*/
#media (min-width: 768px) and (max-width: 992px) {
.staff-picked-videos .col-sm-4:nth-child(3n+1) {
clear: both;
}
}
/*screen-md*/
#media (min-width: 992px) and (max-width: 1200px) {
staff-picked-videos .col-md-3:nth-child(4n+1) {
clear: both;
}
}
/*screen-lg corresponds with col-lg*/
#media (min-width: 1200px) {
staff-picked-videos .col-md-3:nth-child(4n+1) {
clear: both;
}
}
The first column on every new row should clear i.e they should have clear:both in their css markup.
In your example the first column (These athletes are...), 5th column (Ronaldinho making...) should clear floats.
So you should add this CSS rule:
.staff-picked-videos .col-md-3:nth-child(4n+1) {
clear: both;
}
I think the expected behaviour is:
CardA CardB CardC CardD
CardE ...
Right?
If yes, the root cause of your problem is: The height of cards are different. In your case, CardA's height is larger than CardB, when CardB is placed in new row, browser will try to find the most left and most top position (unfortunately, "top" has higher priority than "left", which is the behaviour of float -- the underline CSS rule used by col-md-3). So, if CardA's height is 110 and CardB&CardC&CardD's height is 100, the result would be:
CardA CardB CardC CardD
CardE ...
If CardA's height is 110 and CardB's height is 105 and CardC&CardD's height is 100, the result would be:
CardA CardB CardC CardD
CardE ...
To implement your expected behaviour, cards should be placed in columns, not rows. For example, CardA and CardE should be put into one <div>, CardB and CardF should be put into another <div> etc.
Your columns will not have class col-md-3. Instead they will have col-md-2 where first column will have an additional class col-md-offset-1
Your column structure would look like this -
<div class="row">
<div class="col-md-2 col-md-offset-1"></div>
<div class="col-md-2"></div>
<div class="col-md-2"></div>
<div class="col-md-2"></div>
<div class="col-md-2"></div>
</div>
The offset adds space to the left of your element.
You can see the first li height is increased due to that only this issue is caused due to lengthy title please use excerpt css for title https://www.w3schools.com/cssref/tryit.asp?filename=trycss3_text-overflow . You can set maximum height to the post and also give overflow hidden or please use excerpt css to the title of the post if the height of all post is adjusted by maximum height css your issue will be fixed.