I have three different divs that should be displaying one after the other, but they just jump right up to each other on the webpage. Here is the code for all of them:
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-BVYiiSIFeK1dGmJRAkycuHAHRg32OmUcww7on3RYdg4Va+PmSTsz/K68vbdEjh4u" crossorigin="anonymous">
<div class="top-section">
<center>
<div class="container" style="margin-top:150px;">
<div class="row">
<div class="top-title">
<h1>Introducing 10/40 Academy.</h1>
<h3>An affordable entrepreneurship course that can double as high school credit.</h3>
<img src="/Man_iPhone_Desk.jpg" style="height:300px;margin:30px;border-radius:4px;" class="raised hidden-xs" /><br>
Watch Video <span class="glyphicon glyphicon-play-circle"></span>
<h3 class="hidden-sm hidden-xs" style="letter-spacing:2px;margin-top:0px;">SCROLL DOWN</h3>
<h1 class="hidden-sm hidden-xs" style="font-weight:100;font-size:30px;"><span class="glyphicon glyphicon-chevron-down"></span></h1>
</div>
</div>
</div>
</center>
</div>
<div class="begin-tour">
<div class="container">
<div class="row">
<div class="col-md-6" style="margin-top:50px;">
<h2>Interested in small business?</h2>
<h2>We're here to help.</h2>
<p>
Paragraph
</p>
</div>
<div class="col-md-6">
<center>
<img width="70%" src="/MacImageBase.png" />
</center>
</div>
</div>
</div>
</div>
<div class="qualif">
<div class="container">
<div class="row">
<div class="col-md-6">
<h2>Header here</h2>
<h2>Header</h2>
<p>
some text
</p>
</div>
<div class="col-md-6"></div>
</div>
</div>
</div>
The best way to explain what happens is through a photo.
I've added the 3 divs into the bootstrap container, took out center(it is not used anymore or supported by HTML5), put each div as a 12 column row(col-md-12 class) so they show up one after the other like you wanted:
<div class="container">
<div class="row">
<div class="top-section col-md-12">
<div class="container" style="margin-top:150px;">
<div class="row">
<div class="top-title">
<h1>Introducing 10/40 Academy.</h1>
<h3>An affordable entrepreneurship course that can double as high school credit.</h3>
<img src="/Man_iPhone_Desk.jpg" style="height:300px;margin:30px;border-radius:4px;" class="raised hidden-xs" /><br>
Watch Video <span class="glyphicon glyphicon-play-circle"></span>
<h3 class="hidden-sm hidden-xs" style="letter-spacing:2px;margin-top:0px;">SCROLL DOWN</h3>
<h1 class="hidden-sm hidden-xs" style="font-weight:100;font-size:30px;"><span class="glyphicon glyphicon-chevron-down"></span></h1>
</div>
</div>
</div>
</div>
<div class="begin-tour col-md-12">
<div class="container">
<div class="row">
<div class="col-md-6" style="margin-top:50px;">
<h2>Interested in small business?</h2>
<h2>We're here to help.</h2>
<p>
Paragraph
</p>
</div>
<div class="col-md-6">
<center>
<img width="70%" src="/MacImageBase.png" />
</center>
</div>
</div>
</div>
</div>
<div class="qualif col-md-12">
<div class="container">
<div class="row">
<div class="col-md-6">
<h2>Header here</h2>
<h2>Header</h2>
<p>some text</p>
</div>
<div class="col-md-6"></div>
</div>
</div>
</div>
</div>
</div>
Here is the plunker so you can see it.
Please let me know if this helps. I didn't see your image until now so I hope it helps.
Related
I'd like to know how to replace the position for the image from right side to left side and the text from right side to left side
my code is :-
<div class="section margin-top_50">
<div class="container">
<div class="row">
<div class="col-md-6 layout_padding_2">
<div class="full">
<div class="heading_main text_align_left">
<h2><span> TT </span> ERP </h2>
</div>
<div class="full">
<p> TEST </p>
</div>
</div>
</div>
<div class="col-md-6">
<div class="full">
<img src="images/img2.png" alt="#" />
</div>
</div>
</div>
</div>
</div>
There you go. to change the text from right to left just use the class text-left and if you want it to the right use text-right do the same for the image container
<div class="section margin-top_50">
<div class="container">
<div class="row">
<div class="col-md-6 layout_padding_2">
<div class="full">
<!-- added class text-left -->
<div class="heading_main text_align_left text-left">
<h2><span> TT </span> ERP </h2>
</div>
<!-- added class text-left -->
<div class="full text-left">
<p> TEST </p>
</div>
</div>
</div>
<div class="col-md-6">
<!-- added class text-left -->
<div class="full text-left">
<img src="images/img2.png" alt="#" />
</div>
</div>
</div>
</div>
</div>
if you only want to show image in left side and text in right side then the image column should be there after the text column
<div class="section margin-top_50">
<div class="container">
<div class="row">
<div class="col-md-6">
<div class="full">
<img src="images/img2.png" alt="#" />
</div>
</div>
<div class="col-md-6 layout_padding_2">
<div class="full">
<div class="heading_main text_align_left">
<h2><span> TT </span> ERP </h2>
</div>
<div class="full">
<p> TEST </p>
</div>
</div>
</div>
</div>
</div>
</div>
Swapping the elements should be helpful.
<div class="section margin-top_50">
<div class="container">
<div class="row">
<!-- Was in 2nd previously -->
<div class="col-md-6">
<div class="full">
<img src="images/img2.png" alt="#" />
</div>
</div>
<!-- Was in 1st previously -->
<div class="col-md-6 layout_padding_2">
<div class="full">
<div class="heading_main text_align_left">
<h2><span> TT </span> ERP </h2>
</div>
<div class="full">
<p> TEST </p>
</div>
</div>
</div>
</div>
</div>
</div>
I have a content that looks like this in large screens:
1 2
3 4
5 6
And I want it to look like this in smaller screens
1
2
3
4
5
6
But instead it looks like this:
1
3
5
2
4
6
How can i pull this off?
My html is something like this:
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.0/css/bootstrap.min.css" integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
<div class="container">
<div class="row">
<div class="col-lg-6">
<p> Content1 </p>
<div class="row">
<div class="col-sm-4">
<img src="Content3-img" alt="">
</div>
<div class="col-sm-8">
<p> Content3 </p>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<img src="Content5-img" alt="">
</div>
<div class="col-sm-8">
<p> Content5 </p>
</div>
</div>
</div>
<div class="col-lg-6">
<p> Content2 </p>
<div class="row">
<div class="col-sm-4">
<img src="Content4-img" alt="">
</div>
<div class="col-sm-8">
<p> Content4 </p>
</div>
</div>
<div class="row">
<div class="col-sm-4">
<img src="Content6-img" alt="">
</div>
<div class="col-sm-8">
<p> Content6 </p>
</div>
</div>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="col-sm-6">
<div class="row">
<div class="col-sm-4">
<img src="Content1-img" alt="">
</div>
<div class="col-sm-8">
<p> Content 1 </p>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-sm-4">
<img src="Content2-img" alt="">
</div>
<div class="col-sm-8">
<p> Content 2 </p>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-sm-4">
<img src="Content3-img" alt="">
</div>
<div class="col-sm-8">
<p> Content 3 </p>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-sm-4">
<img src="Content4-img" alt="">
</div>
<div class="col-sm-8">
<p> Content 4 </p>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-sm-4">
<img src="Content5-img" alt="">
</div>
<div class="col-sm-8">
<p> Content 5 </p>
</div>
</div>
</div>
<div class="col-sm-6">
<div class="row">
<div class="col-sm-4">
<img src="Content6-img" alt="">
</div>
<div class="col-sm-8">
<p> Content 6 </p>
</div>
</div>
</div>
</div>
</div>
Your bootstrap columns should be direct children of the .row bootstrap class. This way you can easily get the results you want.
<div class="container">
<div class="row">
<div class="col-lg-6">
<!--Your content-->
</div>
<div class="col-lg-6">
<!--Your content-->
</div>
<div class="col-lg-6">
<!--Your content-->
</div>
.
.
.
</div>
</div>
I wanted to change the default theme of Asp.net.I changed it but now the problem is whenever i click on the login button or register button on the navbar it shows on the home page instead of showing it on a different page.I tired figuring out where the problem was coming from here's what i gathered so far
<!--This Is Causing That Problem-->
<Section id="TextHeader">
<div class="container px-0">
<div class="row">
<div class="col-lg-12" id="special">
<h1 class="text-center text-white">Content</h1>
<h5>Content</h5>
<a type="button" class="btn btn-danger rounded-pill" href="About us.html">Get Started</a>
</div>
</div>
</div>
</Section>
<Section id="content">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12" id="hulky">
<h3 class="text-center">Why Us</h3>
<hr>
<p class="text-center">
content
</p>
Get Started
</div>
</div>
</div>
</Section>
<section id="Middle">
<div class="container-fluid">
<div class="row">
<div class="col-lg-12">
<h3 class="text-center">Content</h3>
<hr>
</div>
</div>
</div>
</section>
<section id="unamed">
<DIV class="container-fluid px-0">
<div class="row">
<div class="col-lg-6">
<img src="Teacher.jpg" alt="" class="img-fluid d-none d-lg-block">
</div>
<div class="col-lg-6">
<h4>Content</h4>
<p id="teacher">Content</p>
</div>
</div>
</DIV>
</section>
<section id="Students">
<DIV class="container-fluid px-0">
<div class="row">
<div class="col-lg-6">
<img src="Student.jpg" alt="" class="img-fluid d-none d-lg-block">
</div>
<div class="col-lg-6">
<h1>Content>
</div>
</div>
</DIV>
</section>
this code has something that is causing the problem and this is default bootstrap code so its very tough to know what is causing the problem
I'm struggling with a rather simple task but the lack of CSS experience is getting the better of me:
<div class="row">
<div class="col-lg-3">
<div class="ibox-content m-b-sm border-bottom">
<div class="ibox-title">
<span class="label label-info pull-right">Offline</span>
<h5>Equipment Pass</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">#Model.AirportPassEquipmentOffline.TransactionCount</h1>
<small># of Transactions</small>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="ibox-content m-b-sm border-bottom">
<div class="ibox-title">
<span class="label label-success pull-right">Online</span>
<h5>Equipment Pass</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">#Model.AirportPassEquipmentOnline.TransactionCount</h1>
<small># of Transactions</small>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="ibox-content m-b-sm border-bottom">
<div class="ibox-title">
<span class="label label-info pull-right">Offline</span>
<h5>Visitor Pass</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">#Model.AirportPassVisitorOffline.TransactionCount</h1>
<small># of Transactions</small>
</div>
</div>
</div>
<div class="col-lg-3">
<div class="ibox-content m-b-sm border-bottom">
<div class="ibox-title">
<span class="label label-success pull-right">Online</span>
<h5>Visitor Pass</h5>
</div>
<div class="ibox-content">
<h1 class="no-margins">#Model.AirportPassVisitorOnline.TransactionCount</h1>
<small># of Transactions</small>
</div>
</div>
</div>
</div>
Above is a row on my view. There are many like it:
I want to split the smallest div to show a second Heading1. Here is base HTML:
<div class="ibox-content">
<h1 class="no-margins">#Model.AirportPassEquipmentOffline.TransactionCount</h1>
<small># of Transactions</small>
<h1 class="no-margins">#Model.AirportPassEquipmentOffline.Income</h1>
<small>Income generated</small>
</div>
Target:
I need to show more information and I see that the div card is empty on the right side. I want to split this div into two. Experimenting with bootstrap classes, the layout breaks.
Afer a bit of trial and error, i realized that the small grid class was the issue. I switched to class-md and got the desired result. So this:
<div class="ibox-content">
<h1 class="no-margins">#Model.AirportPassEquipmentOffline.TransactionCount</h1>
<small># of Transactions</small>
<h1 class="no-margins">#Model.AirportPassEquipmentOffline.Income</h1>
<small>Income generated</small>
</div>
Became this:
<div class="ibox-content">
<div class="row">
<div class="col-md-6">
<h1 class="no-margins">#Model.AirportPassEquipmentOnline.TransactionCount.ToString("N0")</h1>
<small># of Transactions</small>
</div>
<div class="col-md-6">
<h1 class="no-margins">AED #Model.AirportPassEquipmentOnline.Income.ToString("N2")</h1>
<small>Revenue generated</small>
</div>
</div>
</div>
I have this code for making a cards stackable box. The problem is that this box is showing me a right paddding in the fragment, can anyone help me?
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<link rel="stylesheet" href="./semantic/semantic.css"/>
<title>Agora</title>
</head>
<body>
<div class="ui teal inverted menu" style="border-radius: 0px;">
<div class="item">
<div class="huge ui buttons">
<div class="ui button">One</div>
<div class="ui button">Two</div>
<div class="ui button">Three</div>
</div>
</div>
<div class="item">
<div class="ui button">Log-in</div>
</div>
</div>
<div class="ui column centered grid">
<div class="fourteen wide column">
<div class="ui center aligned segment">
<div class="ui stackable four column centered grid" >
<div class="column">
<div class="ui card">
<div class="image">
<img src="http://semantic-ui.com/images/avatar/large/elliot.jpg">
</div>
<div class="content">
<a class="header">Stevie Feliciano</a>
<div class="meta">
<span class="date">Joined in 2014</span>
</div>
<div class="description">
Stevie Feliciano is a library scientist living in New York City. She likes to spend her time reading, running, and writing.
</div>
</div>
<div class="extra content">
<a>
<i class="user icon"></i>
22 Friends
</a>
</div>
</div>
</div>
<div class="column">
<div class="ui card">
<div class="image">
<img src="http://semantic-ui.com/images/avatar/large/elliot.jpg">
</div>
<div class="content">
<a class="header">Stevie Feliciano</a>
<div class="meta">
<span class="date">Joined in 2014</span>
</div>
<div class="description">
Stevie Feliciano is a library scientist living in New York City. She likes to spend her time reading, running, and writing.
</div>
</div>
<div class="extra content">
<a>
<i class="user icon"></i>
22 Friends
</a>
</div>
</div>
</div>
<div class="column">
<div class="ui card">
<div class="image">
<img src="http://semantic-ui.com/images/avatar/large/elliot.jpg">
</div>
<div class="content">
<a class="header">Stevie Feliciano</a>
<div class="meta">
<span class="date">Joined in 2014</span>
</div>
<div class="description">
Stevie Feliciano is a library scientist living in New York City. She likes to spend her time reading, running, and writing.
</div>
</div>
<div class="extra content">
<a>
<i class="user icon"></i>
22 Friends
</a>
</div>
</div>
</div>
<div class="column">
<div class="ui card">
<div class="image">
<img src="http://semantic-ui.com/images/avatar/large/elliot.jpg">
</div>
<div class="content">
<a class="header">Stevie Feliciano</a>
<div class="meta">
<span class="date">Joined in 2014</span>
</div>
<div class="description">
Stevie Feliciano is a library scientist living in New York City. She likes to spend her time reading, running, and writing.
</div>
</div>
<div class="extra content">
<a>
<i class="user icon"></i>
22 Friends
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
This is the problem image:
http://imgur.com/1lrpbUL.png
I need to remove the padding that's in the right side.
Here is the working example:
<!DOCTYPE html>
<html>
<head lang="en">
<meta charset="UTF-8">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/semantic-ui#2.4.2/dist/semantic.min.css">
<title>Agora</title>
<style type="text/css">
.ui.card {
margin: auto;
}
</style>
</head>
<body>
<div class="ui teal inverted menu" style="border-radius: 0px;">
<div class="item">
<div class="huge ui buttons">
<div class="ui button">One</div>
<div class="ui button">Two</div>
<div class="ui button">Three</div>
</div>
</div>
<div class="item">
<div class="ui button">Log-in</div>
</div>
</div>
<div class="ui column centered grid">
<div class="fourteen wide column">
<div class="ui center aligned segment">
<div class="ui stackable four column centered grid" >
<div class="column">
<div class="ui card">
<div class="image">
<img src="http://semantic-ui.com/images/avatar/large/elliot.jpg">
</div>
<div class="content">
<a class="header">Stevie Feliciano</a>
<div class="meta">
<span class="date">Joined in 2014</span>
</div>
<div class="description">
Stevie Feliciano is a library scientist living in New York City. She likes to spend her time reading, running, and writing.
</div>
</div>
<div class="extra content">
<a>
<i class="user icon"></i>
22 Friends
</a>
</div>
</div>
</div>
<div class="column">
<div class="ui card">
<div class="image">
<img src="http://semantic-ui.com/images/avatar/large/elliot.jpg">
</div>
<div class="content">
<a class="header">Stevie Feliciano</a>
<div class="meta">
<span class="date">Joined in 2014</span>
</div>
<div class="description">
Stevie Feliciano is a library scientist living in New York City. She likes to spend her time reading, running, and writing.
</div>
</div>
<div class="extra content">
<a>
<i class="user icon"></i>
22 Friends
</a>
</div>
</div>
</div>
<div class="column">
<div class="ui card">
<div class="image">
<img src="http://semantic-ui.com/images/avatar/large/elliot.jpg">
</div>
<div class="content">
<a class="header">Stevie Feliciano</a>
<div class="meta">
<span class="date">Joined in 2014</span>
</div>
<div class="description">
Stevie Feliciano is a library scientist living in New York City. She likes to spend her time reading, running, and writing.
</div>
</div>
<div class="extra content">
<a>
<i class="user icon"></i>
22 Friends
</a>
</div>
</div>
</div>
<div class="column">
<div class="ui card">
<div class="image">
<img src="http://semantic-ui.com/images/avatar/large/elliot.jpg">
</div>
<div class="content">
<a class="header">Stevie Feliciano</a>
<div class="meta">
<span class="date">Joined in 2014</span>
</div>
<div class="description">
Stevie Feliciano is a library scientist living in New York City. She likes to spend her time reading, running, and writing.
</div>
</div>
<div class="extra content">
<a>
<i class="user icon"></i>
22 Friends
</a>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>
It might be a problem that each of these cards do not fill the width of their column so they are aligned to the left.
You could use the class ".cards" which is mentioned here (it uses flexbox to fit the cards perfectly).
The code found in documentation:
<div class="ui cards">
<div class="card">
<a class="image">
<img src="/images/avatar/large/elliot.jpg">
</a>
<div class="content">
<a class="header">Elliot Fu</a>
<div class="meta">
<a>Friends</a>
</div>
<div class="description">
Elliot Fu is a film-maker from New York.
</div>
</div>
</div>
<div class="card">
<a class="image">
<img src="/images/avatar/large/helen.jpg">
</a>
<div class="content">
<a class="header">Helen Troy</a>
<div class="meta">
<a>Friends</a>
</div>
<div class="description">
Helen Troy is an archivist living in New York, who enjoys cooking, fine art, and gardening.
</div>
</div>
</div>
</div>