aboutsummaryrefslogtreecommitdiff
path: root/examples
diff options
context:
space:
mode:
authorMark Otto <[email protected]>2013-08-27 09:10:06 -0700
committerMark Otto <[email protected]>2013-08-27 09:10:06 -0700
commit4f28fdd22787c2ff96d69d037760db0b7b40648d (patch)
tree8866cf1f61bc46def15fe1a79c3bc0f1d5095012 /examples
parentc84374f9def122c31860260ddeb3049a27da6c2c (diff)
downloadbootstrap-4f28fdd22787c2ff96d69d037760db0b7b40648d.tar.xz
bootstrap-4f28fdd22787c2ff96d69d037760db0b7b40648d.zip
Fixes #9928 and #9932: carousel example in IE10
* Use absolute positioning instead to remove navbar from flow of document * No more negative margin fu * Flip around padding between container and navbar for proper display in xs and sm viewports
Diffstat (limited to 'examples')
-rw-r--r--examples/carousel/carousel.css28
1 files changed, 24 insertions, 4 deletions
diff --git a/examples/carousel/carousel.css b/examples/carousel/carousel.css
index 13d86511c..a728bd899 100644
--- a/examples/carousel/carousel.css
+++ b/examples/carousel/carousel.css
@@ -14,20 +14,31 @@ body {
/* Special class on .container surrounding .navbar, used for positioning it into place. */
.navbar-wrapper {
- position: relative;
+ position: absolute;
+ top: 0;
+ left: 0;
+ right: 0;
z-index: 20;
}
+/* Flip around the padding for proper display in narrow viewports */
+.navbar-wrapper .container {
+ padding-left: 0;
+ padding-right: 0;
+}
+.navbar-wrapper .navbar {
+ padding-left: 15px;
+ padding-right: 15px;
+}
+
/* CUSTOMIZE THE CAROUSEL
-------------------------------------------------- */
/* Carousel base class */
.carousel {
+ height: 500px;
margin-bottom: 60px;
-
- /* Negative margin to pull up carousel. 90px is roughly margins and height of navbar. */
- margin-top: -90px;
}
/* Since positioning the image, we need to help out the caption */
.carousel-caption {
@@ -103,6 +114,15 @@ body {
.navbar-wrapper {
margin-top: 20px;
}
+ .navbar-wrapper .container {
+ padding-left: 15px;
+ padding-right: 15px;
+ }
+ .navbar-wrapper .navbar {
+ padding-left: 0;
+ padding-right: 0;
+ }
+
/* The navbar becomes detached from the top, so we round the corners */
.navbar-wrapper .navbar {
border-radius: 4px;