Solved

Glitch when viewing from computer to mini-window(smartphone)

Posted on 2016-11-26
1
19 Views
Last Modified: 2016-11-28
 <div id="icons" style= "color: white;font-size:18px;padding-bottom:350px;padding-left:250px;padding-top:50px">

    <div class="col-lg-2 col-sm-6 col-md-2 col-xs-6">
            <i class="fa fa-laptop fa-4x " style= "font-size:100px;"></i>
            <hr style="width: 110px;margin-right:1300px;"> 
        You will be able <br>to leave a comment<br> anywhere!
        </div>


 <div class="col-lg-2 col-sm-6 col-md-2 col-xs-6" style= "margin-left:30px;">
            <i class="fa fa-commenting-o fa-4x " style= "font-size:100px;"></i>
            <hr style="width: 110px;margin-right:1300px;"> 
        All you need to do <br>is highlight your text
        </div>      

<div class="col-lg-2 col-sm-6 col-md-2 col-xs-6" style= "margin-left:30px;">
            <i class="fa fa-pencil-square-o fa-4x " style= "font-size:100px;"></i>
            <hr style="width: 110px;margin-right:1300px;"> 
         Then click right and edit!
        </div>      

 <div class="col-lg-2 col-sm-6 col-md-2 col-xs-6 " style= "margin-left:30px;">
            <i class="fa fa-check-square-o fa-4x " style= "font-size:100px;"></i>
            <hr style="width: 110px;margin-right:1300px;"> 
        It's a top A edit, <br>enjoy it on your handheld <br>or computer devices.
        </div>          

</div>

Open in new window


I have the code above, the output is this(image1):
image1But when I make my window smaller (since I want to view it on my smartphone) I get this
image2
    <div id="icons" style= "color: white;font-size:18px;padding-bottom:350px;padding-left:250px;padding-top:50px">

    <div class="col-lg-2 col-sm-6 col-md-2 col-xs-6">
            <i class="fa fa-laptop fa-4x " style= "font-size:100px;"></i>
            <hr style="width: 110px;margin-right:1300px;">
        You will be able <br>to leave a comment<br> anywhere!
        </div>


 <div class="col-lg-2 col-sm-6 col-md-2 col-xs-6" style= "margin-left:30px;">
            <i class="fa fa-commenting-o fa-4x " style= "font-size:100px;"></i>
            <hr style="width: 110px;margin-right:1300px;">
        All you need to do <br>is highlight your text
        </div>      

<div class="col-lg-2 col-sm-6 col-md-2 col-xs-6" style= "margin-left:30px;">
            <i class="fa fa-pencil-square-o fa-4x " style= "font-size:100px;"></i>
            <hr style="width: 110px;margin-right:1300px;">
         Then click right and edit!
        </div>      

 <div class="col-lg-2 col-sm-6 col-md-2 col-xs-6 " style= "margin-left:30px;">
            <i class="fa fa-check-square-o fa-4x " style= "font-size:100px;"></i>
            <hr style="width: 110px;margin-right:1300px;">
        It's a top A edit, <br>enjoy it on your handheld <br>or computer devices.
        </div>          

</div>
I have the code above, the output is this(image1): image1

But when I make my window smaller (since I want to view it on my smartphone) I get this (image2): image2

I tried vertical aligning them, but nothing seemed to work, As you can see I need the padding so they won't be stuck to one another, is there any way I can fix this glitch?
0
Comment
Question by:Jasmine Ikhreishi
1 Comment
 
LVL 30

Accepted Solution

by:
Marco Gasi earned 500 total points
ID: 41902863
The problem is that you are putting 4 columns set as col-2, but 2 x 4 = 8: with Bootstrap the sum of columns must always be 12.
With following style you get something similar to what you want. You probably have to play with it a bit to fit the res of your markup, but I think this could put you in the right way.
		<style>
			.icons{
				background: #0099ff; 
				color: white;
				font-size:18px; 
				padding: 50px 0 350px;
			}
			.icon{
				margin: 0 30px;
				padding-left: 5px;
				padding-right: 5px;
			}
		</style>

Open in new window


html
		<div class="row">
			<div class="col-xs-2"></div>
			<div class="col-xs-8 icons">


				<div class="col-lg-2 col-sm-6 col-md-2 col-xs-6 icon">
					<i class="fa fa-laptop fa-4x " style= "font-size:100px;"></i>
					<hr style="width: 110px;margin-right:1300px;"> 
					You will be able <br>to leave a comment<br> anywhere!
				</div>


				<div class="col-lg-2 col-sm-6 col-md-2 col-xs-6 icon">
					<i class="fa fa-commenting-o fa-4x " style= "font-size:100px;"></i>
					<hr style="width: 110px;margin-right:1300px;"> 
					All you need to do <br>is highlight your text
				</div>      

				<div class="col-lg-2 col-sm-6 col-md-2 col-xs-6 icon">
					<i class="fa fa-pencil-square-o fa-4x " style= "font-size:100px;"></i>
					<hr style="width: 110px;margin-right:1300px;"> 
					Then click right and edit!
				</div>      

				<div class="col-lg-2 col-sm-6 col-md-2 col-xs-6 icon">
					<i class="fa fa-check-square-o fa-4x " style= "font-size:100px;"></i>
					<hr style="width: 110px;margin-right:1300px;"> 
					It's a top A edit, <br>enjoy it on your handheld <br>or computer devices.
				</div>          


			</div>
			<div class="col-xs-2"></div>

		</div>

Open in new window


Testing page here: http://test.webintenerife.com/test-responsive.html
0

Featured Post

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Ajax control editor 4 37
Safari SVG Image Problem 1 21
Apostophes in PHP generated form 6 20
HTML CSS 7 20
So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
Browsers only know CSS so your awesome SASS code needs to be translated into normal CSS. Here I'll try to explain what you should aim for in order to take full advantage of SASS.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now