I have a Button for example that has the popover data toggle:
<button type="button" class="btn btn-primary" data-toggle="popover" title="User Info">Popover with Title</button>
The JS code that is associated with this popover:
$(document).ready(function(){
$('[data-toggle="popover"]').popover({
placement : 'top',
trigger : 'hover',
html : true,
content : '<div class="container mt-5 d-flex justify-content-center"> <div class="card p-3"> <div class="d-flex align-items-center"> <div class="image"> <img src="https://images.unsplash.com/photo-1522075469751-3a6694fb2f61?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80" class="rounded" width="155"> </div><div class="ml-3 w-100"> <h4 class="mb-0 mt-0">Alex Morrision</h4> <span>Senior Journalist</span> <div class="p-2 mt-2 bg-primary d-flex justify-content-between rounded text-white stats"> <div class="d-flex flex-column"> <span class="articles">Articles</span> <span class="number1">38</span> </div><div class="d-flex flex-column"> <span class="followers">Followers</span> <span class="number2">980</span> </div><div class="d-flex flex-column"> <span class="rating">Rating</span> <span class="number3">8.9</span> </div></div><div class="button mt-2 d-flex flex-row align-items-center"> <button class="btn btn-sm btn-outline-primary w-100">Chat</button> <button class="btn btn-sm btn-primary w-100 ml-2">Follow</button> </div></div></div></div></div>'
});
});
CSS for the popover Bootstrap card:
.card {
width: 400px;
border: none;
border-radius: 10px;
background-color: #fff
}
.stats {
background: #f2f5f8 !important;
color: #000 !important
}
.articles {
font-size: 10px;
color: #a1aab9
}
.number1 {
font-weight: 500
}
.followers {
font-size: 10px;
color: #a1aab9
}
.number2 {
font-weight: 500
}
.rating {
font-size: 10px;
color: #a1aab9
}
.number3 {
font-weight: 500
}
However, when I hover over the card, with the appropriate CSS, it will show the default popover background behind the bootstrap card that is with it.
How do I solve this?
See if this works for you:
$(document).ready(function() {
$('[data-toggle="popover"]').popover({
placement: 'top',
trigger: 'hover',
html: true,
content: '<div class="card p-3"> <div class="d-flex align-items-center"> <div class="image"> <img src="https://images.unsplash.com/photo-1522075469751-3a6694fb2f61?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=500&q=80" class="rounded" width="155"> </div><div class="ml-3 w-100"> <h4 class="mb-0 mt-0">Alex Morrision</h4> <span>Senior Journalist</span> <div class="p-2 mt-2 bg-primary d-flex justify-content-between rounded text-white stats"> <div class="d-flex flex-column"> <span class="articles">Articles</span> <span class="number1">38</span> </div><div class="d-flex flex-column"> <span class="followers">Followers</span> <span class="number2">980</span> </div><div class="d-flex flex-column"> <span class="rating">Rating</span> <span class="number3">8.9</span> </div></div><div class="button mt-2 d-flex flex-row align-items-center"> <button class="btn btn-sm btn-outline-primary w-100">Chat</button> <button class="btn btn-sm btn-primary w-100 ml-2">Follow</button> </div></div></div></div>'
});
});
.popover-title { display: none !important; }
.popover {
max-width: 500px !important;
}
.popover-header{
display: none !important;
}
.popover-body {
padding: 0px !important;
}
.card{
border: none !important;
}
.card {
width: 400px;
border: none;
border-radius: 10px;
background-color: #fff
}
.stats {
background: #f2f5f8 !important;
color: #000 !important
}
.articles {
font-size: 10px;
color: #a1aab9
}
.number1 {
font-weight: 500
}
.followers {
font-size: 10px;
color: #a1aab9
}
.number2 {
font-weight: 500
}
.rating {
font-size: 10px;
color: #a1aab9
}
.number3 {
font-weight: 500
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#4.6.0/dist/css/bootstrap.min.css" integrity="sha384-B0vP5xmATw1+K9KRQjQERJvTumQW0nPEzvF6L/Z6nronJ3oUOFUFpCjEUQouq2+l" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#4.6.0/dist/js/bootstrap.bundle.min.js" integrity="sha384-Piv4xVNRyMGpqkS2by6br4gNJ7DXjqk09RmUpJ8jgGtD7zP9yug3goQfGII0yAns" crossorigin="anonymous"></script>
<button type="button" class="btn btn-primary" data-toggle="popover" title="User Info">Popover with Title</button>
Live Demo: https://jsfiddle.net/7fnqw418/
P.S: You can comment out the .popover-header class if you wish to display the popover header
First, rename your css class .card.
.custom-card {
width: 400px;
border: none;
border-radius: 10px;
background-color: #fff
}
If you just want to apply your style do this :
<div class="custom-card">
If you want to mix bootstrap style and yours, you can add multiple classes to a single DOM element.
Rules given in later classes (or which are more specific) override.
<div class="card custom-card">
Related
I'm using a bootstrap 4 accordion and I was trying to add an icon besides the arrow up/down icon. I've tried to add a row and both icon place inside a row but still can't figure out how to make these two inline.
Here's what I have tried so far.
<div class="accordion" id="accordionExample">
<div class="card mb-3">
<div class="card-header" id="heading-1">
<h5 class="mb-0 card-header-title">
<a class="btn btn-link text-left collapsed" role="button" data-toggle="collapse" data-target="#collapse-1" aria-expanded="false" aria-controls="collapse-1">
Item 3
</a>
</h5>
</div>
<div id="collapse-1" class="collapse" data-parent="#accordionExample" aria-labelledby="heading-1">
<div class="card-body">
Description 1
</div>
</div>
</div>
</div>
CSS:
.card-header-title > a {`
display: block;
position: relative;
}
.card-header-title > a:hover {
cursor: pointer;
}
.card-header-title > a:after {
content: "\f078"; /* fa-chevron-down */
font-family: "Font Awesome 5 Free";
font-weight: 900;
position: absolute;
right: 0;
}
.card-header-title > a[aria-expanded="true"]:after {
content: "\f077"; /* fa-chevron-up */
}
Result:
And this is what I expected:
Do you mean something like this?
.card-header-title > a {
display: block;
position: relative;
}
.card-header-title > a:hover {
cursor: pointer;
}
.card-header-title i.fa-chevron-up {
display: none;
}
.card-header-title > a[aria-expanded="true"] i.fa-chevron-down {
display: none;
}
.card-header-title > a[aria-expanded="true"] i.fa-chevron-up {
display: inline;
}
<link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.2.1/css/all.min.css" rel="stylesheet"/>
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#4.0.0/dist/css/bootstrap.min.css" integrity="sha384-Gn5384xqQ1aoWXA+058RXPxPg6fy4IWvTNh0E263XmFcJlSAwiGgFAW/dAiS6JXm" crossorigin="anonymous">
<div class="accordion" id="accordionExample">
<div class="card mb-3">
<div class="card-header" id="heading-1">
<h5 class="mb-0 card-header-title d-flex justify-content-between align-items-center">
<a class="btn btn-link text-left collapsed d-inline-flex justify-content-between w-100" role="button" data-toggle="collapse" data-target="#collapse-1" aria-expanded="false" aria-controls="collapse-1">
Item 3
<span class="float-right">
<i class="fa-solid fa-chevron-down"></i>
<i class="fa-solid fa-chevron-up"></i>
</span>
</a>
<span><i class="fa-solid fa-trash float-right ml-2"></i></span>
</h5>
</div>
<div id="collapse-1" class="collapse" data-parent="#accordionExample" aria-labelledby="heading-1">
<div class="card-body">
Description 1
</div>
</div>
</div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js" integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/popper.js#1.12.9/dist/umd/popper.min.js" integrity="sha384-ApNbgh9B+Y1QKtv3Rn7W3mgPxhU9K/ScQsAP7hUibX39j7fakFPskvXusvfa0b4Q" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#4.0.0/dist/js/bootstrap.min.js" integrity="sha384-JZR6Spejh4U02d8jOt6vLEHfe/JQGiRRSQQxSfFWpi1MquVdAyjUar5+76PVCmYl" crossorigin="anonymous"></script>
How do I change the link color into this Bootstrap 4 card without affecting the link color of other cards on the same HTML page?
/* I've tried this but it affects all cards on the HTML page: */
.card a:link {
color: white;
}
.card a:visited {
color: white;
}
.card a:hover {
color: white;
text-decoration: none;
}
.card a:active {
color: white;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#4.6.1/dist/css/bootstrap.min.css" integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn" crossorigin="anonymous">
<div class="col-md-6">
<div class="card py-4 card-container">
<a href="#">
<div class="card-body">
<i class="fa-light fa-book-open my-4" style="font-size: 36px"></i><br/>
<p class="card-text text-center">CODE SAMPLES</p>
</div>
</a>
</div>
</div>
This is a textbook case for a custom class. You'd put it on the card you want to customize and write CSS accordingly. Or, use Bootstrap's text color utilities to directly style your links with theme colors, which adds hover color shift automatically. I'll demonstrate both approaches here.
.card.orangy a {
color: orange;
}
.card.orangy a:hover,
.card.orangy a:active {
color: darkorange;
}
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap#4.6.1/dist/css/bootstrap.min.css" integrity="sha384-zCbKRCUGaJDkqS1kPbPd7TveP5iyJE0EjAuZQTgFLD2ylzuqKfdKlfG/eSrtxUkn" crossorigin="anonymous">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.1.1/css/all.min.css" integrity="sha512-KfkfwYDsLkIlwQp6LFnl8zNdLGxu9YAA1QvwINks4PhcElQSvqcyVLLD9aMhXd13uQjoXtEKNosOWaZqXgel0g==" crossorigin="anonymous" referrerpolicy="no-referrer" />
<div class="container-fluid">
<div class="row mt-2">
<div class="col-4">
<div class="card py-2 card-container">
<a href="#">
<div class="card-body">
<i class="fa-light fa fa-book-open mb-4" style="font-size: 36px"></i><br/>
<p class="card-text text-center">Common card with no link styles</p>
</div>
</a>
</div>
</div>
<div class="col-4">
<div class="card orangy py-2 card-container"> <!--------------- HERE -->
<a href="#">
<div class="card-body">
<i class="fa-light fa fa-book-open mb-4" style="font-size: 36px"></i><br/>
<p class="card-text text-center">Card with custom class</p>
</div>
</a>
</div>
</div>
<div class="col-4">
<div class="card py-2 card-container">
<a href="#" class="text-danger"> <!-------------------------- HERE -->
<div class="card-body">
<i class="fa-light fa fa-book-open mb-4" style="font-size: 36px"></i><br/>
<p class="card-text text-center">Card with a text color class</p>
</div>
</a>
</div>
</div>
</div>
</div>
Paste the code in your CSS file you need to change the focus color in p tag
.card a:link {
color: #333;
}
.card a:visited p {
color: white;
}
.card a:hover p {
color: green;
text-decoration: none;
}
.card a:active p {
color: white;
}
.card a:focus p {
color: #f00;
}
<div class="col-md-6">
<div class="card py-4 card-container">
<a href="#">
<div class="card-body">
<i class="fa-light fa-book-open my-4" style="font-size: 36px"></i><br/>
<p class="card-text text-center">CODE SAMPLES</p>
</div>
</a>
</div>
</div>
I am trying to scroll through a list of items, but scroll is working only for some of the items, not all. After a certain item, the scroll stops and does not go the last item.
Here is the Stackblitz link.
https://angular-cym8q4.stackblitz.io/
This is for a chatlist overlay which contains list of profiles. Please refer to the following screenshot:
In the above screenshot, I am not able to scroll through all the profiles. Scroll if happening for only some of the profiles, it is not going to the very end of the list.
Here is my code:
app.component.html
<div class="container-fluid">
<div class="row">
<div class="col-3 d-none d-lg-block col-offset-5 red coloverlay bg-custom">
<app-chatlist></app-chatlist>
</div>
</div>
</div>
app.component.css
.coloverlay {
background-color: rgba(233, 33, 33, 0.4);
margin: 0;
padding: 0;
position: fixed;
top: 150px;
z-index: 1;
bottom: 0;
right: 0;
margin: 0;
}
.bg-custom {
background: #2c3e50;
}
chatlist.component.html
<div class="container-fluid p-0">
<div class="row m-0 ">
<div class="col p-0">
<div class="d-flex flex-row chatlistbox ">
<div class="m-2">
Chat
</div>
<div class="ml-auto mt-1 pr-2">
<i class="fa fa-window-minimize " aria-hidden="true"></i>
</div>
<div class="m-2">
<i class="fa fa-cog" aria-hidden="true"></i>
</div>
</div>
<div class="customList">
<ul class="list-group overflow-auto" id="contact-list">
<app-chatlist-item class="list-group-item p-0 border-0" *ngFor="let el of elList" [element]="el">
</app-chatlist-item>
</ul>
</div>
</div>
</div>
</div>
chatlist.component.css
.overflow-auto {
height: 100%;
overflow-y: auto;
overflow-x: hidden;
}
.customList {
height: 93%;
}
.chatlistbox {
background: aquamarine;
height: 2%;
}
chatlist-item.component.html
<div class="d-flex flex-row bg-custom item">
<div class="p-2">
<img src="{{element.imagePath}}" alt="" />
</div>
<div class="p-2">
<div class="d-flex flex-column flex-wrap name">
<h6 class="m-0">
{{element.firstName}} {{element.lastName}}
</h6>
<span class="details">
{{element.details}}
</span>
</div>
</div>
</div>
chatlist-item.component.css
img {
width: 80px;
height: 80px;
border-radius: 40px;
padding: 3px;
float: left;
cursor: pointer;
}
.bg-custom {
background: #2c3e50;
}
* {
color: #e3dcdc;
}
.item:hover {
background: #32465a;
}
I am not sure what is the problem. Any help would be highly apprecitated.
The issue is that the container is taller than the page, so the scroll bar goes off the page.
To fix it, you need to set the height on some of the elements, like so:
.container-fluid.p-0,
.row.m-0,
.col.p-0 {
height: 100%;
}
Finally, you will need to change the height of customList. I would recommend using calc instead of a fixed percentage, which may not be what you want.
.customList {
height: calc(100% - 15px);
}
Here is a fork of the stackblitz with the CSS fixed:
https://stackblitz.com/edit/angular-7c7dmk?file=src/app/chatlist/chatlist.component.css
I am creating a web page layout using bootstrap and the backend is Laravel, the web page is partitioned into various divs which work fine on various screen devices but when I upload the project on a live server and view the page on mobile part of the service and contact section is hidden behind a white background, I find it hard to figure out the problem in CSS code,,,please assist?
Code
#font-face {
font-family: 'Pacifico';
font-style: normal;
font-weight: 400;
src: local('Pacifico Regular'), local('Pacifico-Regular'), url("../fonts/pacifico.woff") format('woff');
}
html,
body {
margin: 0;
padding: 0;
}
img,
object,
embed,
video {
max-width: 100%;
height: auto;
}
/*Service section*/
.service-heading {
font-size: 22px;
}
#service {
background: url(../img/bg/number1.gif) repeat center center fixed;
color: #ffffff;
display: block;
}
#service h3,
p {
color: #ffffff;
}
#service .block-heading h1 {
color: #fff;
font-family: 'Milonga', cursive;
font-weight: 400;
font-size: 55px;
word-spacing: 5px;
}
/*Contact section*/
#contact {
background: url(../img/bg/contact-bg.jpg) no-repeat center center fixed;
background-size: cover;
color: #fff;
}
#contact .block-heading h1 {
color: #fff;
font-family: 'Milonga', cursive;
font-weight: 400;
font-size: 55px;
}
.overlay-3 {
padding: 60px 0;
/* background-color: rgba(9, 20, 39, 0.83); */
/* background-color: rgba(24, 77, 77, 0.93); */
background-color: rgba(33, 103, 88, 0.9);
}
.contact-info {
padding: 16px 62px;
text-align: left;
font-size: 18px;
line-height: 36px;
margin-top: 25px;
}
. .contact-info i {
width: 40px;
height: 40px;
color: white;
padding-top: 7px;
font-size: 25px;
border: 1px solid #fff;
text-align: center;
-webkit-transform: rotate(-45deg);
transform: rotate(-45deg);
-ms-transform: rotate(-45deg);
-moz-transform: rotate(-45deg);
}
.contact-info p {
padding: 27px 10px;
}
.contact-info span {
padding-left: 20px;
}
input[type="text"],
input[type="email"],
textarea {
display: block;
margin: 0 auto;
width: 100%;
background: transparent;
border: 1px solid #fff;
padding: 12px 15px;
margin-bottom: 30px;
}
input[type="submit"] {
background: transparent;
border: 1px solid #fff;
width: 100%;
padding: 10px;
transition: 0.5s background linear;
font-weight: bold;
}
input[type="submit"]:hover {
background: #fff;
border-color: #fff;
transition: 0.5s background linear;
color: #333;
}
::-webkit-input-placeholder {
color: #fff;
}
::-moz-placeholder {
/* Firefox 19+ */
color: #fff;
}
:-ms-input-placeholder {
color: #fff;
}
#media only screen and (min-width: 321px) and (max-width: 480px) {
#service {
display: inline-block;
height: 100%;
width: 100%;
padding-bottom: 20px;
background: blue;
}
.overlay-3 {
background: none;
padding: 0;
}
#contact {
display: inline-block;
height: 100%;
width: 100%;
}
}
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="utf-8">
<meta http-equiv=X-UA-Compatible content="IE=edge">
<meta name=viewport content="width=device-width, initial-scale=1.0, minimum-scale=0.5, maximum-scale=3.0">
<meta name="HandheldFriendly" content="true">
<link rel="icon" type="image/x-icon" href="img/favicon.ico"> >
<link href="{{ asset('css/bootstrap/css/bootstrap.min.css') }}" rel="stylesheet" type="text/css">
<link href="{{ asset('css/bootstrap/css/font-awesome.min.css') }}" rel="stylesheet" type="text/css">
<!-- google font -->
<link href='http://fonts.googleapis.com/css?family=Oswald:300,400' rel='stylesheet'>
</head>
<body>
<!-- Service Section -->
<div class="content-block" id="service">
<br><br>
<header class="block-heading cleafix text-center">
<h1> Services</h1>
<!-- <p>Lorem Ipsum Text</p> -->
</header>
<div class="container-fluid">
<div class="row">
<div class="col-lg-12 text-center">
<h3 class="section-subheading text-muted"> Welcome </h3>
</div>
</div>
<div class="row text-center">
<div class="col-md-4">
<span class="fa-stack fa-4x">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
<i class="fa fa-laptop fa-stack-1x fa-inverse"></i>
</span>
<h4 class="service-heading"> School Of Arts</h4>
<p>...............</p>
</div>
<div class="col-md-4">
<span class="fa-stack fa-4x">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
<i class="fa fa-shopping-cart fa-stack-1x fa-inverse"></i>
</span>
<h4 class="service-heading">School of Business </h4>
<p> ........... </p>
</div>
<div class="col-md-4">
<span class="fa-stack fa-4x">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
<i class="fa fa-code fa-stack-1x fa-inverse"></i>
</span>
<h4 class="service-heading"> School of Engineering </h4>
<p> ........ </p>
</div>
</div>
<div class="row text-center">
<div class="col-md-4">
<span class="fa-stack fa-4x">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
<i class="fa fa-wordpress fa-stack-1x fa-inverse"></i>
</span>
<h4 class="service-heading"> School of Human Resource</h4>
<p> ........ </p>
</div>
<div class="col-md-4">
<span class="fa-stack fa-4x">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
<i class="fa fa-pencil fa-stack-1x fa-inverse"></i>
</span>
<h4 class="service-heading"> School of Medicine </h4>
<p> ........ .......</p>
</div>
<div class="col-md-4">
<span class="fa-stack fa-4x">
<i class="fa fa-circle fa-stack-2x text-primary"></i>
<i class="fa fa-thumbs-up fa-stack-1x fa-inverse"></i>
</span>
<h4 class="service-heading"> School of Biological Sciences </h4>
<p> .......... </p>
</div>
</div>
</div>
</div>
<!-- END SERVICE SECTION-->
<!-- Contact Form Section-->
<div class="content-block" id="contact">
<div class="overlay-3">
<header class="block-heading cleafix text-center">
<h1>Contact</h1>
<!-- <p>Feel Free to Contact</p> -->
</header>
<div class="block-content text-center">
<div class="container-fluid">
<div class="row">
<!-- Form Section -->
<div class="col-sm-4 wow animated fadeInLeft">
{!! Form::open(array('route' => 'index.post', 'method' => 'POST','class' => 'contact-form')) !!} {{ Form::text('name', null, array( 'placeholder' => 'Name...', 'class' => 'input', 'required' => ''))}} {{ Form::email('email', null, array('placeholder'
=> 'Email Address...','class' => 'input', 'required' => ''))}} {{ Form::textarea('message', null, array('placeholder' => 'Message...', 'class' => '', 'required' => 'input')) }} {{ Form::submit('Submit') }} {!! Form::close() !!}
</div>
<!-- Adress -->
<div class="col-sm-4 wow animated fadeInRight">
<div class="row">
<div class="col-sm-12">
<div class="contact-info">
<div class="clearfix">
<div class="rotated-icon">
<div class="sqaure-nebir"></div>
<i class="fa fa-map-marker"></i>
</div>
<p><strong> 3069 Nkr</strong> </p>
</div>
<div class="tel clearfix">
<div class="rotated-icon">
<div class="sqaure-nebir"></div>
<i class="fa fa-mobile"></i>
</div>
<p>
<strong> <a class="tell" href="tel:+256123456" rel="nofollow"> +256 123456 </a> </strong>
<br>
<strong> <a class="tell" href="tel:+256547890" rel="nofollow"> +254 756789098</a> </strong>
</p>
</div>
<div class="clearfix">
<div class="rotated-icon">
<div class="sqaure-nebir"></div>
<i class="fa fa-envelope-o"></i>
</div>
<p>
<strong> info#tcol.com </strong>
</p>
</div>
</div>
</div>
</div>
<div class="row">
<ul class="social-box">
<li>
<a class="facebook-icon" href="https://www.facebook.com/pwebkenya" target="_blank"> <i class="fa fa-facebook"></i></a>
</li>
<li>
<a class="twitter-icon" href="https://twitter.com/pwebkenya" target="_blank"> <i class="fa fa-twitter"></i></a>
</li>
<li><a class="g-plus-icon" href="https://github.com/patwan"><i class="fa fa-github"></i></a></li>
<li> <a class="linkedin-icon" href="#"><i class="fa fa-linkedin"></i></a></li>
</ul>
</div>
</div>
<!-- photo -->
<div class="col-sm-4">
<br> <br>
<div class="team-member">
<img src="img/7.jpg" class="img-responsive img-circle" alt="">
<h4> Steve Johns</h4>
<p class="text-muted"> Web Developer/Graphics Designer</p>
</div>
</div>
<!-- END PHOTO-->
</div>
</div>
</div>
<!-- block-content -->
</div>
<!-- overlay-3 -->
</div>
<!-- content-block -->
</body>
</html>
There is a typo in your HTML in the 'contact' section:
<header class="block-heading cleafix text-center">``
Therefore, the floats are not cleared on this element. Don't know if it fixes the entire problem though.
I've got a jumbotron class which has to contain a button, but it's strangely extended and that button looks ugly. Why is that so?
HTML
<div class="container">
<div class="jumbotron">
<div class="row">
<div class="col-md-8">
<button class="btn btn-primary btn-sm">
<span class="glyphicon glyphicon-ok">
Why is this button so wide?
</span>
</button>
</div>
</div>
</div>
</div>
CSS
.jumbotron {
margin: 10px;
}
.row {
margin: 8px 0;
}
If I try to reduce the size of the column, for example, col-md-4, nothing changes.
Your mistake is you wrote the text inside icon span. Here is the fixed code
.jumbotron {
margin: 10px;
}
.row {
margin: 8px 0;
}
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet"/>
<div class="container">
<div class="jumbotron">
<div class="row">
<div class="col-md-8">
<button class="btn btn-primary btn-sm">
<span class="glyphicon glyphicon-ok"></span>
Why is this button so wide?
</button>
</div>
</div>
</div>
</div>
in main page use this...
<header>
<div class="container">
<div class="intro-text">
<div class="intro-lead-in">Welcome!!!</div>
<div class="intro-heading">Let's Get Started</div>
Tell Me More
</div>
</div>
</header>
in css
use this
.btn-xl {
padding: 20px 40px;
border-color: #fed136;
border-radius: 3px;
text-transform: uppercase;
font-family: Montserrat,"Helvetica Neue",Helvetica,Arial,sans-serif;
font-size: 18px;
font-weight: 700;
color: #fff;
background-color: #fed136;
}
this will solve your problem