Text | Image | Text - 1 Horizontal Row - Bootstrap - html

First of all, I will immediately apologise for the fact that it would appear that I am asking the same question which has been answered several times on here already.
Despite spending the last 1-2 hours trying to find the answer, I have caved in and am looking for someone to give it to me, but to also explain why I was wrong.
EDIT
I can't get the 2 div's of text, and the image in 1 ROW using Bootstrap.
I want TEXT | PIC | TEXT.
Here's the HTML using Bootstrap:
<div class="container">
<div class="row-fluid">
<div class="MainLeftInfo col-lg-3 col-md-3 col-sm-12 col-xs-12">
<h3 style="bold">The Story</h3>
<p>Text Text Text</p>
</div>
</div>
</div>
<div class="container">
<div class="row">
<div class="PicOfMe col-lg-3 col-md-3 col-sm-12 col-xs-12">
<img src="Pictures\jacksparrow.jpg" alt="A picture of me!">
</div>
<div class="MainRightInfo col-lg-3 col-md-3 col-sm-12 col-xs-12">
<h3> Interests, Hobbies and Addictions </h3>
<ul>
<li>Gaming (Xbox & PC)</li>
<li>Animals</li>
<li>Web Development</li>
<li>Red Bull</li>
<li>Chocolate</li>
</ul>
<h3> Location </h3>
<p> Cranleigh, Surrey</p>
<h3> Skillset (So Far) </h3>
<ul>
<li>HTML</li>
<li>CSS</li>
<li>Javascript</li>
<li>Responsive Web Design (Bootstrap)</li>
<li>Ability to liase and discuss technical concepts with non-technical people</li>
</ul>
</div>
</div>
</div>
Heres the CSS:
.PicOfMe img {
border: 20px solid white;
border-radius: 100%;
width: 200px;
height: 200px;
margin: 0 auto;
}

You just need 1 container on a page, and move all col-* divs into the the ` like this:
<div class="container">
<div class="row">
<div class="MainLeftInfo col-md-4 col-sm-12 col-xs-12">
<!-- the story -->
</div>
<div class="PicOfMe col-md-4 col-sm-12 col-xs-12">
<img src="Pictures\jacksparrow.jpg" alt="A picture of me!">
</div>
<div class="MainRightInfo col-md-4 col-sm-12 col-xs-12">
<!-- interests -->
</div>
</div>
</div>
Comment about Bootstraps grid system: all col-*adds up to 12; probably you want to change col-md-3 to col-md-4? Also, it's not necessary to define the same columns twice. col-md-4 will create the same as col-lg-4 on wider screens. Bootstrap works "bottom > up" (or "smaller > large")
See plunkr https://plnkr.co/edit/8zYl7pODUi9bzFicLG19?p=preview

Related

Can't click on links of my footer on mobile version

For my work I had to create a custom homepage for an existing Wordpress website. Since my boss liked my footer I had to implement my own footer in the theme used.
My footer works fine but in mobile version, I can't click on links...
Here is the website: website
Does anyone have an idea ?
<div class="container">
<div class="col-xs-12 col-sm-6 col-md-3 text-left footer-column">
<h3>EB Quad</h3>
<ul>
<li>Accueil</li>
<li>Atelier</li>
<li>Occasions</li>
<li>Contact</li>
<li>Livre d'or</li>
</ul>
</div>
<div class="col-xs-12 col-sm-6 col-md-3 text-left footer-column">
<h3>CF Moto</h3>
<ul>
<li>Quads</li>
<li>Buggys</li>
</ul>
</div>
<div class="col-xs-12 col-sm-6 col-md-3 text-right footer-column">
<h3>Randonnées</h3>
<ul>
<a href="https://www.ebquad.be/randonnees/">
<li>Nos randonnées</li>
</a>
<li>Agenda</li>
<li>Photos</li>
<li>Informations/Tarifs</li>
</ul>
</div>
<div class="col-xs-12 col-sm-6 col-md-3 text-right footer-column">
<h3>Informations</h3>
<ul>
<li><a href="https://www.google.com/maps/place/E.b.+Renove/#50.3840829,4.0316377,15z/data=!4m2!3m1!1s0x0:0xe36a2bfccc6eb3da?ved=2ahUKEwj5r93ciZjfAhVQNOwKHfAYCtQQ_BIwDXoECAYQCA" target="_blank" rel="noopener noreferrer">
Route de Beaumont 10<br>
7041 Givry (Mons)</a></li>
<li>info#eri-renove.be</li>
<li>0495/447.304</li>
</ul>
</div>
<!-- .footer-widget-wrap -->
<div class="col-xs-12 col-sm-12 col-md-12 text-center">
<div style="font-size:12px; margin:auto; text-align:center;">Site réalisé par:</div>
<a href="http://www.mds-digitalagency.be" class="watermark-link" target="_blank"><img src="https://www.ebquad.be/wp-content/uploads/2018/12/mds_logo.png"
style="width: 64px; margin-bottom:30px;" alt=""></a>
</div>
<div class="footer-bottom-wrap col-md-12">
EB QUAD © Tous droits réservés | Conditions générales
</div><!-- .footer-bottom-wrap -->
</div><!-- container -->
Thanks
Your .footer-bottom-wrap covers the whole footer. Add display: inline-block to this element and all works fine.
Add this css inside your stylesheet
.footer-bottom-wrap {float: left;}
Since your links are float elements they aren't displayed as the normal flow, and your .foote-bottom-wrap elemnt is not a float element this is why this element will cover all of your links.. you can fix it using this class..
.footer-bottom-wrap {
...
overflow:hidden;
}
This property fix this behavior.. you can find a good tutorial to understand float behavior here
Add this in your style.css line number 380 "overflow: hidden;"
It's caused by your css code just try to add
via HTML
<div class="clearfix"></div>
<!--before-->
<div class="footer-bottom-wrap col-md-12">
Or via CSS
.footer-bottom-wrap {
color: #787977;
overflow: hidden;
}

Bootstrap Footer Column/Row issue

I have a footer on a Bootstrap website, which has 4 items in columns in its row - this display's correctly on desktop screens.
For mobile screen's I want it to change it to display 2 items, with the other 2 items below this - and the formatting of 1 item is all screwy.
Here's an image of the Footer on a desktop.
And here's an image of the footer for a small screen (i.e: mobile)
In the small screen image, the "accredited" image should be somewhat inline with the "We're Social" lines of text, and not below it.
Ive tried changing the column sizes (i.e: making "Accredited" = col-xs-7 & col-sm-7 and "We're Social" = col-xs-5 & col-sm-5), but its made no difference.
any suggestions as to where the issue lies?
Here's the HTML code for my footer:
<!-- ========= START FOOTER ========== -->
<footer class="footer">
<div class="container">
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-3">
<a href="http://www.acnc.gov.au/" target="_blank">
<img class="img-responsive center-block" src="images/ACNC-Charity-Logo.png" alt="ACNC Charity" width="150" height="150"></a>
</div>
<div class="col-xs-6 col-sm-6 col-lg-3 text-center">
<h4><strong>Contact Us</strong></h4>
<ul class='list-unstyled'>
<li><i class='glyphicon glyphicon-globe'></i> 67-71 Strathallan Rd, Macleod, Victoria</li>
<li><i class='glyphicon glyphicon-phone'></i> (03) 9450 7600</li>
<li><i class='glyphicon glyphicon-envelope'></i> <a href='mailto:office#openhousecic.org.au'>office#openhousecic.org.au</a></li>
</ul>
</div>
<div class="col-xs-6 col-sm-6 col-lg-3 text-center">
<h4><strong>We're Social</strong></h4>
<ul class='list-unstyled'>
<li>Facebook</li>
<li>YouTube</li>
<li>LinkedIn</li>
<li>Flickr</li>
</ul>
</div>
<div class="col-xs-6 col-sm-6 col-lg-3">
<!--<div class="blank-gap-20"></div>-->
<a href="http://www.qip.com.au/" target="_blank">
<img class="img-responsive center-block" src="images/QIP-logo.png" alt="QIP logo" width="150" height="83"></a>
</div>
</div> <!-- End Row -->
<div class="row">
<div class="col-sm-12 col-md-12 text-center">
<span>Open House Christian Involvement Centres © 2017 : Website by Bliss</span>
<div class="blank-gap-10"></div>
<p><i>We acknowledge and pay respect to the Traditional Owners of the lands upon which Open House Christian Involvement Centres are situated.</i><p>
</div>
</div> <!-- End row -->
</div> <!--- End Container -->
</footer>
And my site is using the 'Sticky-Footer' CSS for Bootstrap;
/* Sticky footer styles
-------------------------------------------------- */
html {
position: relative;
min-height: 100%;
}
body {
/* Margin bottom by footer height */
margin-bottom: 330px;
}
.footer {
position: absolute;
bottom: 0;
width: 100%;
padding-top: 10px;
/* Set the fixed height of the footer here */
height: auto;
min-height:200px;
background-color: #f1eeee;
color: #333
/*color: #f9f9f9;*/
}
You need to use a responsive reset as the columns are different height because of the content is each column. Here is a similar question.
<div class="row">
<div class="col-xs-6 col-sm-6 col-lg-3">
..
</div>
<div class="col-xs-6 col-sm-6 col-lg-3 text-center">
..
</div>
<div class="visible-sm visible-xs clearfix"></div>
<div class="col-xs-6 col-sm-6 col-lg-3 text-center">
..
</div>
<div class="col-xs-6 col-sm-6 col-lg-3">
..
</div>
</div>
http://www.codeply.com/go/m5nWYTYa4H

Bootstrap grid items not rendering alongside eachother

I'm having trouble with the bootstrap grid system. The div below <div class="col-xs-12 col-md-4"> should be on the right side while the other divs are on the left. Currently the first two column divs are correct and rendering at the top, but then the third column div doesn't render until the bottom of the image rather than alongside it. I need them to display correctly, what can I do?
<div class="container">
<div class="row">
<div class="col-xs-12 col-md-7">
<h1>WELCOME TO YOUR NETWORK PROGRAM WEBSITE</h1>
</div>
<div class="col-xs-12 col-md-4">
<img src="images/tie.png">
</div>
<div class="col-xs-12 col-md-7">
<div class="loginText">
Get information about your Connect plan
<br><br>
If you have any problems logging in, please contact your account manager for help.
<br><br>
</div>
</div> <!-- cols -->
</div> <!-- row -->
</div> <!-- container -->
It looks like this
The third div needs to be moved up under the first div, but it's currently below the height of the second div.
Bootstrap's framework is build on a 12 column layout.
So
col-md-7 + col-md-4 + col-md-7 = 18 columns exceeding the 12 column limit, hence pushing the third div to the next line.
You can fix it by changing the col-md's to col-md-5 + col-md-2 + col-md-5 like this:
<div class="row">
<div class="col-xs-12 col-md-5">
<h1>WELCOME TO YOUR NETWORK PROGRAM WEBSITE</h1>
</div>
<div class="col-xs-12 col-md-2">
<img src="images/tie.png">
</div>
<div class="col-xs-12 col-md-5">
<div class="loginText">Get information about your Connect plan<br><br>If you have any problems logging in, please contact your account manager for help.<br><br>
</div>
</div> <!-- cols -->
</div>
Your question isn't very clear but from what I understand, col-md-7 plus col-md-4 plus col-md-7 equal 18, 6 more than the allotted 12. So it will go onto the next line.
The bootstrap grid system always adds to 12 in a row. you have md-7 and md-4 that's only 11.
you need to change
<div class="col-xs-12 col-md-4">
to
<div class="col-xs-12 col-md-5">
now you have 7+5 =12.
So, according to your updated question, you want the text on the left and the image on the right. You can do that as follows:
<div class="row">
<div class="col-xs-12 col-md-8">
<div class="row">
<div class="col-xs-12">
<h1>WELCOME TO YOUR NETWORK PROGRAM WEBSITE</h1>
</div>
<!-- div below is hidden in xs -->
<div class="col-md-12 hidden-xs">
<div class="loginText">Get information about your Connect plan<br><br>If you have any problems logging in, please contact your account manager for help.<br><br>
</div>
</div>
</div>
</div>
<div class="col-xs-12 col-md-4">
<img src="images/tie.png">
</div>
<!-- div below is shown only in xs -->
<div class="col-md-12 visible-xs">
<div class="loginText">Get information about your Connect plan<br><br>If you have any problems logging in, please contact your account manager for help.<br><br>
</div>
</div>
</div>

Bootstrap grid div being pushed out at certain sizes

I wanted to create a layout with one image on the left taking up 6 columns and 2 'rows' and 4 squares on the right taking up the other half, i.e/ each one taking up 3 columns, 2 on top and 2 below.
This all works fine, except that 1 image gets pushed down. When the screen is made smaller, it pops back up, and then drops back down again at other smaller sizes.
Here it is on bootply
and here is my code:
<div class="container">
<div class="container-fluid">
<div class="row-fluid">
<div class="box1 col-md-6">
<img src="http://www2.buit.ie/wp-content/uploads/2015/06/Sheep-002-Wm.jpg">
</div>
<div class="box1 col-md-3 col-sm-6">
<img src="http://www2.buit.ie/wp-content/uploads/2015/06/roseveal.jpg">
</div>
<div class="box1 col-md-3 col-sm-6">
<img src="http://www2.buit.ie/wp-content/uploads/2015/06/roseveal5.jpg">
</div>
<div class="box1 col-md-3 col-sm-6">
<img src="http://www2.buit.ie/wp-content/uploads/2015/06/Sheep-002-Wm.jpg">
</div>
<div class="box1 col-md-3 col-sm-6">
<img src="http://www2.buit.ie/wp-content/uploads/2015/06/tentego_wagen.jpg">
</div>
</div>
</div>
</div>
My CSS is:
.box1 img {
width:100%;
}
.container {
width:100%;
padding:0px;
max-width: 1265px;
overflow: auto;
}
.row {
margin-left: 0px;
margin-right: 0px;
}
.col-md-3, .col-md-6, .col-sm-6 {
padding-left: 0px;
padding-right: 0px;
}
Please excuse the images - I'm meant to be designing a sort of farming website!
Any help or insight would be so much appreciated.
I have determined that it has to do with your images not being consistent.
Basically, your images are all different sizes, and you make no effort to enforce a standard upon them. You do put them in bootstrap columns, which is keeping them the proper widths, but the heights are still messing up and differing just slightly, which sometimes kicks your last image down to the next row.
I changed this css by adding a height:auto, which helped.
.box1 img{
width:100%;
height: auto;
}
I then tried making all four images on the right the same image, and the problem went away completely. I forked your bootply over here if you want to see the whole thing.
I have to say, It's looking pretty neat, you should be proud of yourself. It flows really well other than this hiccup. You might consider setting the max-height, or setting height to auto if you make sure that your pictures are all identical aspect ratios. They are already close to the same aspect ratio, but it's giving you these subtle difference that were difficult to detect visually, but are screwing up your layout.
Rufus, Try doing it like this.
Here is the full size Fiddle.
Using 3 sets of rows looks to help what you are looking to to here.
The extra classes also help keep the layout that you are looking for too.
<div class="container-fluid col-lg-12">
<div class="row-fluid col-sm-6 col-md-6 col-lg-6">
<div class="box1 col-sm-12 col-md-12 col-lg-12">
<img src="http://www2.buit.ie/wp-content/uploads/2015/06/Sheep-002-Wm.jpg">
</div>
</div>
<div class="row-fluid col-sm-6 col-md-6 col-lg-6">
<div class="box2 col-xs-6 col-sm-6 col-md-6 col-lg-6">
<img src="http://www2.buit.ie/wp-content/uploads/2015/06/roseveal.jpg">
</div>
<div class="box2 col-xs-6 col-sm-6 col-md-6 col-lg-6">
<img src="http://www2.buit.ie/wp-content/uploads/2015/06/roseveal5.jpg">
</div>
</div>
<div class="row-fluid col-sm-6 col-md-6 col-lg-6">
<div class="box2 col-xs-6 col-sm-6 col-md-6 col-lg-6">
<img src="http://www2.buit.ie/wp-content/uploads/2015/06/Sheep-002-Wm.jpg">
</div>
<div class="box2 col-xs-6 col-sm-6 col-md-6 col-lg-6">
<img src="http://www2.buit.ie/wp-content/uploads/2015/06/tentego_wagen.jpg">
</div>
</div>
</div>

Creating a Bootstrap fluid different-height-elements grid

I'm trying to get a simple grid-like webpage done where there are 8 DIVs spanning across 9 positions.
I've done the following for another part of the website using Bootstrap's grid system without running into any kind of issue (Not the actual content, just a mockup using Photoshop)
What I want to do is this:
Having in mind that when the site is viewed in a mobile device, the order of the elements must be more-or-less preserved. Also Bootstrap standard margins/paddings must be used
Ideally this would be fixed-height DIVs inside of which I'll put an image or some text, depending on which one. The double-height one will contain a picture
<div class="wrapper" id="mypage">
<section class="grid-container service">
<ul class="small-grid grid-col-3">
<li class="col-3">
<div id="subtitle">
SUBTITLE 1
</div>
</li>
<li class="col-3">
<div id="title">
TITLE
</div>
</li>
<li class="col-3">
<div id="subtitle">
SUBTITLE 2
</div>
</li>
<a href="">
<li class="col-3 img-dynamic-size" style="background-image: url('../1.jpg')">
</li>
</a>
<a href="">
<li class="col-3 img-dynamic-size" style="background-image: url('../2.jpg')">
</li>
</a>
Sample code of the 1st screen
Thank you, I can't figure out how to do it after thinking about it for some time...
Okay.. I think I'm following you, I've just drawn up some sample bootstrap code for you to see what I'm talking about. You can achieve this look by just stripping out relevant padding/margin and using the Bootstrap equal-height columns experiment
I have just stripped out all relevant margin and padding on the nested rows in the example but you can obviously play with these values only cancelling out or amending the vertical/horizontal margin/padding as required for your own use.
HTML
<div class="container">
<div class="row">
<div class="col-xs-4 border">
<div id="subtitle">SUBTITLE 1</div>
</div>
<div class="col-xs-4 border">
<div id="title">TITLE</div>
</div>
<div class="col-xs-4 border">
<div id="title">TITLE</div>
</div>
</div>
<div class="row row-eq-height">
<div class="col-xs-8 nopadding">
<div class="row nomargin">
<div class="col-xs-6 nomargin border">Some Content...</div>
<div class="col-xs-6 nomargin border">Some More Content...</div>
</div>
<div class="row nomargin">
<div class="col-xs-6 nomargin border">Some Content Below...</div>
<div class="col-xs-6 nomargin border">Some More Content Below...</div>
</div>
</div>
<div class="col-xs-4 border">Content matching height using the 'row-eq-height' class</div>
</div>
CSS
.nomargin {
margin:0;
}
.nopadding {
padding: 0;
}
.row-eq-height {
display: -webkit-box;
display: -webkit-flex;
display: -ms-flexbox;
display: flex;
}
.border {
border: 1px solid red;
min-height: 50px;
}
You can see a jsFiddle here