Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

container div over container-fluid div - bootstrap

Featured Replies

Hi,

 

I am creating a carousel with bootstrap and want the images to be full width. there are some text that is beeing loadded to the carousel and this one I would like to be in a specific place.

 

Perhaps its easier to explain with images.

 

what I want to do:

post-17588-0-92356800-1498921001_thumb.jpg
the grey box it should be a full width image
post-17588-0-52103000-1498920997_thumb.jpg
for the code I have the following:
        <?php
/**
 * The template for displaying all pages
 *
 * This is the template that displays all pages by default.
 * Please note that this is the WordPress construct of pages
 * and that other 'pages' on your WordPress site may use a
 * different template.
 *
 * @[member="link"] https://codex.wordpress.org/Template_Hierarchy
 *
 * @package bootstrapwp
 */
get_header();
?>

<div id="primary" class="content-area">
    <main id="main" class="site-main" role="main">

        <!--BOOTSTRAP CAROUSEL START-->
        <div id="carousel-wrapper" class="container-fluid">
        
        <!-- Indicators -->
        <div id="carousel-home" class="carousel slide" data-ride="carousel">
            <div class="row">   
            <!-- Indicators -->
            <ol class="carousel-indicators">
                <li data-target="#carousel-home" data-slide-to="0" class="active"></li>
                <li data-target="#carousel-home" data-slide-to="1"></li>
                <li data-target="#carousel-home" data-slide-to="2"></li>
            </ol>

            <!-- Wrapper for slides -->
            <div class="carousel-inner" role="listbox">
                <?php $slider = get_posts(array('post_type' => 'slider', 'posts_per_page' => 3)); ?>
                <?php $count = 0; ?>
                <?php foreach ($slider as $slide): ?>
                <div class="carousel-item <?php echo ($count == 0) ? 'active' : ''; ?>">
                <img src="<?php echo wp_get_attachment_url(get_post_thumbnail_id($slide->ID)) ?>" class="d-block img-fluid" alt="Responsive image"/>
                <div id="carousel-comment-box" class="container" ><?php echo $slide->post_content; ?></div>
                </div>           
                <?php $count++; ?>
                <?php endforeach; ?>
                
            </div>
        </div> <!--BOOTSTRAP CAROUSEL END-->
    </div><!--Row END-->         
    </div><!--Container-fluid END-->
    
    </main><!-- #main -->
</div><!-- #primary -->

<?php
get_footer();


the CSS

// BOOTSTRAP CAROUSEL START//

// Carousel global START //
#carousel-wrapper
{ 
  padding:0 ! important;
  position: relative;
} 

#carousel-home 
{ 
  position: relative;
  height: auto;
}

.carousel-inner img
{ 
  padding: 0;
  height: 300px;
}

// Carousel global END //


// Carousel Comment box START //
#carousel-comment-box
{ 
    position:absolute;
    // Padding top right bottom left //
    padding: 30px 0px 30px 0px; 
    
     // Font//
    color: $color__dark;
    list-style-type: none;
    font-family: $font-family-serif;
    font-style: italic;
    font-weight:700;
    font-size: 1.8em;
    line-height: 1.4em; 
    
     @[member="Include"] media-breakpoint-up(sm) {
        @[member="Include"] make-col(4);
        @[member="Include"] make-col-offset(;
        display: inline-block;
        vertical-align: top;

    }
    @[member="Include"] media-breakpoint-down(sm) {
        @[member="Include"] make-col(12);
    }
 }
// Carousel Comment box END //

the rest of the layout is made with the normal container and I would like the text box to align with the rest. Now it takes as a reference the end of the viewport and not like the container class from bootstrap usually reacts.

 

is there any good idea on how to do this?

perhaps its something simple

 

thank you in advance

 

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.