I am creating a Template HTML CSS page for a To-Do Application and I am using Grid Layout; Container-Fluid with Rows and Columns. I have spaced a Button, some Text, and further 2 Buttons as follows:
<div class="container-fluid">
<div class="row">
<div class="col-3"></div>
<div class="col-6">
<div class="card">
<div class="card-body">
<div class="flex-heading">
<i
class="fas fa-clipboard-list fa-4x icon-backgroundcolor addmain-icon"
></i>
<p class="subhead">ADD ITEM</p>
</div>
<hr />
<div class="row within">
<div class="col-6">
<label class="add_line"
>What do you want to do?</label
>
</div>
</div>
<div class="row within">
<div class="col-8">
<div class="md-form form-group">
<input
type="text"
class="form-control"
name = "description"
[(ngModel)] = "description"
placeholder="I want to do something good"
(keydown.enter)="onKeydown($event, content)"
/>
</div>
</div>
<div class="col-4">
<button
type="button"
class="btn btn-flat add-button"
(click)="open(content)"
>
<i
class="fas fa-plus-circle fa-2x add-icon"
></i>
</button>
</div>
</div>
</div>
</div>
</div>
<div class="col-3"></div>
</div>
</div>
There are Gutters between each Column and the text goes to the next line. What can be a good way to decrease gutter space and let the text space out?
Related
I am stuck with a problem, I made a Contact Us page , it is properly working on desktop mode but when am trying to see in mobile view it is not responsive , can anyone help me to fix this error
This is the Contact Us page, I want its working on mobile view properly
Contact.html
<section id="contact">
<div class="row mt-5 mb-5">
<div class="col-6">
<div class="row text-white ">
<div class="col-6 ">
<div class="row ">
<div class="col-3 icon-fot">
<i class="fas fa-map-marker-alt"></i>
</div>
<div class="col-9 text-form-footer">
<h3 class="font-weight-bold">Find Us</h3>
<p>Mreylebon Rd,Merylebon London,NW1SH,UK</p>
</div>
</div>
<br>
<div class="row">
<div class="col-3 icon-fot">
<i class="far fa-clock"></i>
</div>
<div class="col-9 text-form-footer">
<h3 class="font-weight-bold">Working Hour</h3>
<p style="display: inline;">Mon-Fri : 8AM-5PM</p>
<p>Sat-Sun : 8AM-2PM</p>
</div>
</div>
</div>
<div class="col-6 ">
<div class="row">
<div class="col-3 icon-fot">
<i class="fas fa-phone-alt"></i>
</div>
<div class="col-9 text-form-footer">
<h3 class="font-weight-bold">Call Us</h3>
<p style="display: inline;">+123 456 7890</p>
<p>+123 456 7890</p>
</div>
</div>
<br>
<div class="row">
<div class="col-3 icon-fot">
<i class="far fa-envelope"></i>
</div>
<div class="col-9 text-form-footer">
<h3 class="font-weight-bold">Write To Us</h3>
<p style="display: inline;">Office#noise.com</p>
<p>Press#noise.com</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-6">
<form>
<div class="form-row">
<div class="col">
<input type="text" class="w-100 p-2" placeholder="Your Name...">
</div>
<div class="col">
<input type="text" class="w-100 p-2" placeholder="Your Email...">
</div>
</div>
<textarea class="w-100 p-2 mt-2" placeholder="Your Message..." rows="5" cols="50"></textarea><br />
<button class="btn btn-outline-primary btn-block text-white font-weight-bold">Send</button>
</form>
</div>
</div>
</section>
Can you please check the below code? Hope it will work for you.
You need to use col-md-6 class instead of col-6 class in the parent column class like the below code.
<section id="contact">
<div class="row mt-5 mb-5">
<div class="col-md-6">
<div class="row text-white ">
<div class="col-6 ">
<div class="row ">
<div class="col-3 icon-fot">
<i class="fas fa-map-marker-alt"></i>
</div>
<div class="col-9 text-form-footer">
<h3 class="font-weight-bold">Find Us</h3>
<p>Mreylebon Rd,Merylebon London,NW1SH,UK</p>
</div>
</div>
<br>
<div class="row">
<div class="col-3 icon-fot">
<i class="far fa-clock"></i>
</div>
<div class="col-9 text-form-footer">
<h3 class="font-weight-bold">Working Hour</h3>
<p style="display: inline;">Mon-Fri : 8AM-5PM</p>
<p>Sat-Sun : 8AM-2PM</p>
</div>
</div>
</div>
<div class="col-6 ">
<div class="row">
<div class="col-3 icon-fot">
<i class="fas fa-phone-alt"></i>
</div>
<div class="col-9 text-form-footer">
<h3 class="font-weight-bold">Call Us</h3>
<p style="display: inline;">+123 456 7890</p>
<p>+123 456 7890</p>
</div>
</div>
<br>
<div class="row">
<div class="col-3 icon-fot">
<i class="far fa-envelope"></i>
</div>
<div class="col-9 text-form-footer">
<h3 class="font-weight-bold">Write To Us</h3>
<p style="display: inline;">Office#noise.com</p>
<p>Press#noise.com</p>
</div>
</div>
</div>
</div>
</div>
<div class="col-md-6">
<form>
<div class="form-row">
<div class="col">
<input type="text" class="w-100 p-2" placeholder="Your Name...">
</div>
<div class="col">
<input type="text" class="w-100 p-2" placeholder="Your Email...">
</div>
</div>
<textarea class="w-100 p-2 mt-2" placeholder="Your Message..." rows="5" cols="50"></textarea><br />
<button class="btn btn-outline-primary btn-block text-white font-weight-bold">Send</button>
</form>
</div>
</div>
</section>
HTML
<div class="container">
<div class="jumbotron">
<div class="row">
<div class="col-2"></div>
<div class="col-2 Jumbooptions" id="create" onclick="location.href='#';">
<p class="efr">Create</p>
<i class="fas fa-plus fa-2x" id="ci"></i>
</div>
<div class="col-2 Jumbooptions" id="add" onclick="location.href='#';">
<p class="efr">Add</p>
<i class="fas fa-address-book fa-2x" id="ai"></i>
</div>
<div class="col-2 Jumbooptions" id="stats" onclick="location.href='#';">
<p class="efr">Statistics</p>
<i class="fas fa-chart-pie fa-2x" id="si"></i>
</div>
<div class="col-2 Jumbooptions" id="export" onclick="location.href='#';">
<p class="efr">Export</p>
<i class="fas fa-file-export fa-2x" id="ei"></i>
</div>
</div>
<div class="row" id="bigger">
<div class="col-2" id=""></div>
<div id="created" class="dropdown col-4">
<h2>CREATE</h2>
<p>as many sheets as you want with ease!</p>
</div>
<div id="addd" class="dropdown col-4">
</div>
<div id="statsd" class="dropdown col-4">
</div>
<div id="exportd" class="dropdown col-4">
</div>
</div>
</div>
</div>
CSS
height:70px !important;
width:700px;
margin-left:47px
}
If I make the "height" any more than 70 the rest of the row goes to the start of the jumbotron
When height is less than 70: https://gyazo.com/6601be928cb893b5355c78fbc792e694
When height is more than 70 (200): https://gyazo.com/6b6f96fa6eadcffc6db3dd427cac8d03
I'm really not sure what to do.
I wanna hidden search box in Small Devices(sm) size and instead of that a search button should take place. i wanna my search be like this at sm size.
enter image description here
this is my code:
<div class="container">
<div class="header">
<div class="row">
<div class="col-md-3 ">
<img src="img/1.png" class="header-logo" alt="site-logo">
</div>
<div class="col-md-6">
<div class="input-group search-box">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="fas fa-search"></i>
</span>
</div>
<input type="text" class="form-control" placeholder="جستجو">
</div>
</div>
<div class="col-md-3 btn-header">
<button class="btn">ورود</button>
<button class="btn">ثبت نام</button>
</div>
</div>
</div><!-- =====HEADER DIV===== -->
</div>
Use
hidden-sm
for more details follow https://getbootstrap.com/docs/3.3/css/
<div class="input-group search-box">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="fas fa-search"></i>
</span>
</div>
<!-- your search field is hidden in the sm -->
<input type="text" class="form-control hidden-sm" placeholder="جستجو">
</div>
Devices list
Extra small devices - Phones (<768px)
Small devices - Tablets (≥768px)
Medium devices -Desktops (≥992px)
Large devices -Desktops (≥1200px)
To show or hide elements with bootstrap you have to use the display utilities. For example, if you want to show only on Small Devices you must use d-none d-block d-sm-none.
Your code would be like this:
<div class="container">
<div class="header">
<div class="row">
<div class="col-md-3 ">
<img src="img/1.png" class="header-logo" alt="site-logo">
</div>
<div class="col-md-6 d-none d-md-block">
<div class="input-group search-box">
<div class="input-group-prepend">
<span class="input-group-text">
<i class="fas fa-search"></i>
</span>
</div>
<input type="text" class="form-control" placeholder="جستجو">
</div>
</div>
<div class="col-md-3 btn-header d-sm-none">
<button class="btn">ورود</button>
<button class="btn">ثبت نام</button>
</div>
</div>
</div><!-- =====HEADER DIV===== -->
</div>
You can find the doc here: https://getbootstrap.com/docs/4.0/utilities/display/
I have three cols. The middle one contains a decimal number which could be in this formats:
XX.XX km
XXX.XX km
XXXX.XX km
So there could be two to four numbers before the dot and there are always two numbers after the dot.
My problem is if the number is more then two numbers befor the dot the unitary after the decimal number shifts. Then it is not in the alignment with the one under it.
This screenshot shows what I mean.
Is it possible to fix the middle col width so the unitary alignment is correct?
Also the unitary could be align-right?
This is the part of my code:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="col-xs-6">
<div>
<div class="row overall">
<div class="col-sm-12 reducedMarginRight reducedMarginLeft">
<h4 class="font">Overall</h4>
<hr>
</div>
</div>
<div class="row vcenter">
<div class="col-sm-3">
<span class="align-middle">
<i class="glyphicon glyphicon-road glyphSize"></i>
</span>
</div>
<div class="col-sm-5">
<div class="values font align-middle" id="overall_distance">
</div>
</div>
<div class="col-sm-4">
<div class="values font text-right" id="distanceFormat">
km
</div>
</div>
</div>
<div class="row vcenter">
<div class="col-sm-3">
<span>
<i class="glyphicon glyphicon-time glyphSize"></i>
</span>
</div>
<div class="col-sm-5">
<div class="values font" id="overall_time">
</div>
</div>
<div class="col-sm-4">
<div class="values font text-right">
h
</div>
</div>
</div>
</div>
</div>
If I understand your question correctly, Just add text-right class in your value column
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet"/>
<div class="row">
<div class="col-xs-6">
<div class="row overall">
<div class="col-xs-12 reducedMarginRight reducedMarginLeft">
<h4 class="font">Overall</h4>
<hr>
</div>
</div>
<div class="row vcenter">
<div class="col-xs-3">
<span class="align-middle">
<i class="glyphicon glyphicon-road glyphSize"></i>
</span>
</div>
<div class="col-xs-5 text-right">
<div class="values font align-middle" id="overall_distance">690.05
</div>
</div>
<div class="col-xs-4">
<div class="values font text-right" id="distanceFormat">
km
</div>
</div>
</div>
<div class="row vcenter">
<div class="col-xs-3">
<span>
<i class="glyphicon glyphicon-time glyphSize"></i>
</span>
</div>
<div class="col-xs-5 text-right">
<div class="values font" id="overall_time">07:20
</div>
</div>
<div class="col-xs-4">
<div class="values font text-right">
h
</div>
</div>
</div>
</div>
</div>
I found "equal height" classes in Semantic UI, but I can't make inner div's the same heights ("ui segment" for example).
More detail here .
http://jsfiddle.net/ozk615p6/34/
Check my below Screenshots
<div class="ui container indent border shadow">
<div class="two column stackable ui grid ">
<div class="equal height row">
<div class="column">
<h2 class="ui header center aligned ">Lorem</h2>
<div class="ui segment ">
<div class="ui list ">
<div class="item">
<i class="checkmark icon"></i>
<div class="content">
Lorem
</div>
</div>
<div class="item">
<i class="xmark icon"></i>
<div class="content">
Lorem
</div>
</div>
</div>
</div>
</div>
<div class="column">
<h2 class="ui header center aligned ">Lorem</h2>
<div class="ui segment ">
<div class="ui list">
<div class="item">
<i class="checkmark icon"></i>
<div class="content">
Lorem
</div>
</div>
<div class="item">
<i class="checkmark icon"></i>
<div class="content">Lorem</div>
</div>
<div class="item">
<i class="checkmark icon"></i>
<div class="content">Lorem</div>
</div>
<div class="item">
<i class="xmark icon"></i>
<div class="content">Lorem</div>
</div>
<div class="item">
<i class="xmark icon"></i>
<div class="content">Lorem</div>
</div>
<div class="item">
<i class="xmark icon"></i>
<div class="content">Lorem</div>
</div>
<div class="item">
<i class="xmark icon"></i>
<div class="content">Lorem</div>
</div>
</div>
</div>
</div>
</div>
One approach is to use ui cards per this documentation. In your JSFiddle attached, the version did not yet support equal hight cards which automatically used flex. If you upgrade to latest, you'll obtain support for this.
See an example here: https://jsfiddle.net/5kL2pf7q/1/
According to this post, one possible solution is to use this to match the height of your columns.
Although writing html with just the Semantic UI classes in the code below:
<div class="ui container">
<div class="ui three column doubling stackable grid container">
<% camps.forEach(function (e) { %>
<div class="column">
<h1 class="ui header"><%= e.name %> </h1>
<img src="<%= e.image %>" alt="" class="image small ui">
<p> <%= e.description %></p>
<div class="extra"><div class="ui label">
Read More
</div></div>
</div>
<% }) %>
</div>
</div>
I realized that the columns are already with the same height as you can see here.