Multiple column within row in bootstrap is not working in IE 11 - html

Here is my bootstrap HTML code snippet. It is working fine in all browsers except in IE-11 . I am getting a horizontal scrollbar also the last 2 div col-xs-6 inside a row are coming in 2 different rows not in a single row.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="css/bootstrap.min.css">
<script src="javascript/bootstrap.min.js"></script>
</head>
<body>
<div class="container">
<div class="row" style="background-color:yellow;">
<div class="col-xs-12" style="background-color:aqua;">col-xs-12 inside a row</div>
</div>
</div>
<div class="container">
<div class="row" style="background-color:yellow;"> direct inside a row
</div>
</div>
<div class="container">
<div class="row" style="background-color:yellow;">
<div class="col-xs-6" style="background-color:red;">col-xs-6 inside a row</div>
<div class="col-xs-6" style="background-color:orange;">col-xs-6 inside a row</div>
</div>
</div>
</body>
</html>
Thanks for the help in advance.

You can try to specify the compatibility mode in the document header with:
<meta http-equiv="X-UA-Compatible" content="IE=11" />
Take a look to this link for more info:
IE legacy document modes

Related

How to make 2 squares next to eachother one exists out of columns and rows

i want to make a website with a gallery block but i can't get it working. I only want to use Bootstrap with this and my custom css just for the finishing touches. So i want 2 squares next to eachother, left square needs to be 2 columns and 2 rows and the right square needs to be as big as the left square. Like the photo
I tried different approaches with flex box etc, i cant get it working as it should be
Screenshot of what i want
Try this example:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<link
href="https://cdn.jsdelivr.net/npm/bootstrap#5.3.0-alpha1/dist/css/bootstrap.min.css"
rel="stylesheet"
/>
<link
href="https://getbootstrap.com/docs/5.3/assets/css/docs.css"
rel="stylesheet"
/>
<title>Bootstrap Example</title>
<script src="https://cdn.jsdelivr.net/npm/bootstrap#5.3.0-alpha1/dist/js/bootstrap.bundle.min.js"></script>
</head>
<body class="p-3 m-0 border-0 bd-example bd-example-row">
<!-- Example Code -->
<div class="container text-center">
<div class="row">
<div class="col">
<div class="col">Cell 1</div>
<br />
<div class="col">Cell 2</div>
</div>
<div class="col">
<div class="col">Cell 3</div>
<br />
<div class="col">Cell 4</div>
</div>
<div class="col"></div>
</div>
</div>
<!-- End Example Code -->
</body>
</html>

Bootstrap layout for multiple divs with offset

I want to create a html page with first row which has a sidebar menu and div for showing the KPI metrics. I would like to make this KPI metrics div fixed.
Below this KPI metrics is a div for tables. Now when the user scrolls through the table the KPI metrics div should always be fixed. I would also like to know how to align the KPI metrics div and the table div aligned on the right side. I have figured that I could add position : fixed for the KPI div. But not sure how to align the table div on the right side.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.0/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container-fluid">
<p>KPI DIV TO BE FIXED</p>
<div class="row row-no-gutters">
<div class="col-sm-4" style="background-color:lavender;">SIDEBAR</div>
<div class="col-sm-8" style="background-color:lavenderblush;">KPI DIV</div>
</div>
<br>
<p>TABLE DIV BELOW KPI DIV</p>
<div class="row">
<div class=" offset-md-4 col-md-8" style="background-color:lavenderblush;">TABLE DIV</div>
</div>
</div>
</body>
</html>
Here's a start for you:
https://codepen.io/panchroma/pen/zXBVRp
I'm not clear where you need to go from here though. Let me know if you need more help.
The HTML is very close to what you posted, my only changes are on lines 21 and 23 where I modified the classes.
<div class="row row-no-gutters">
<div class=" col-md-offset-4 col-md-8" style="background-color:lavenderblush;">TABLE DIV</div>
Good luck!

Bootstrap shift div and align content

I have some troubles with my website template. Is it possible to shift div (or container) and leave the content aligned with other content on the page? I can do this with classic HTML + CSS but have some troubles with bootstrap.
See the picture.
<!DOCTYPE html>
<html lang="en">
<head>
<title>Bootstrap Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js"></script>
</head>
<body>
<div class="container-fluid">
<h1>Hello World!</h1>
<p>Resize the browser window to see the effect.</p>
<p>The columns will automatically stack on top of each other when the screen is less than 768px wide.</p>
<div class="row">
<div class="col-xs-4 col-xs-offset-2" style="background-color:lavender;">.col-sm-4</div>
<div class="col-xs-4" style="background-color:lavenderblush;">.col-sm-8</div>
</div>
</div>
</body>
</html>

Issues with Bootstrap/Angular with IE

I seem to be having some strange issues with IE 11. Nothing is contained like it is in Chrome and everything is overflowing like crazy.Everything looks fine in Chrome and Safari and any mobile browser, but IE11 is struggling.
<!DOCTYPE HTML>
<html>
<head>
<meta charset="utf-8">
<title>Forward | Reimagining adn.com</title>
<meta name="description" content="Reimagining adn.com">
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="styles/main.css">
</head>
<body ng-app"myApp" ng-cloak>
<div ng-view=""></div>
<body>
</html>
And here is a snippet of one of my routes:
<div class="section-b">
<div class="container-fluid">
<div class="row vertical-align">
<div class="col-lg-3 col-lg-push-8 col-sm-12"><img alt="Alaska"
class="img-responsive intro-img" src=
"images/introduction_a.jpg"></div>
<div class="col-lg-6 col-lg-offset-1 col-lg-pull-3 col-sm-12">
<div class="clearfix"></div>
<p class="lead">Some text will go here</p>
</div>
</div>
</div>
</div>
In the screenshot below the white area is the text-area and that's an img-responsive, the default width of the page is meant to be the same size as the last image as it's set to 100%. Any suggestions? I'm hoping it's something really simple.

Zurb Foundation columns getting stacked

I have two columns in a row. But the two columns are being stacked vertically.
Here's my code:
<!doctype html>
<html class="no-js" lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Foundation | Welcome</title>
<link rel="stylesheet" href="css/foundation.css" />
<script src="js/vendor/modernizr.js"></script>
</head>
<body>
<div class="row">
<div class="small-2 columns"><p>2 columns</p>
</div>
<div class="small-4 columns"><p>10 columns</p>
</div>
</div>
<script src="js/vendor/jquery.js"></script>
<script src="js/foundation.min.js"></script>
<script>
$(document).foundation();
</script>
</body>
</html>
The 2 column div and the 4 column div should appear side by side but are instead stacked on below the other.
What your telling your code is to set a column of 2 (blocks) width and then 4 (blocks) width, which adds up to 6.
Whereas you need to have the whole row (its parts thereof) add up to 12. There are various number combinations you could use to get to 12, but for simplicity we'll use your commented values.
<div class="row">
<div class="small-2 columns"><p>2 columns</p> </div>
<div class="small-10 columns"><p>10 columns</p> </div>
</div>
Or we can use your ratio sizes to give the look of what I think you were trying to achieve.
<div class="row">
<div class="small-4 columns"><p>1/3 width in columns</p> </div>
<div class="small-8 columns"><p>2/3 with columns</p> </div>
</div>
I hope this helps you with your question.