As I am working on a code as front end image is attached.I want to move this side bar to the top of all division in mobile view https://imgur.com/OsuzoXQ "image1" https://imgur.com/oG6pTDO "mobileimage"

I want the division to move above of all the other divisions

<?php
error_reporting(0);
?>

<div class="container main-container">



<div class="row">
    <div class="container">
        <div class="col-sm-9 home col-sm-push-3" id="content">

            <?php $this->load->view('user/slider'); ?>

        <div style="clear:both"></div>
        <div style="clear:both"></div>
        <div class="hideOnSearch">
            <div class="product-list-wrapper">
                <div class="tricol-product-list">
                    <div class="col-sm-12">
                        <h2 class="visible-xs">New Arrivals</h2>
                    </div>
                    <div class="inv-section">
                        <?php $i = 1; foreach($result as $inventory ): ?>
                            <div class="col-sm-6 inv-col">
                                <div class="item-container">
                                    <a class="price-name" href="<?php echo base_url('UserController/view_single_inventory/'.$inventory->id); ?>">
                                        <?php echo $inventory->name; ?>                                    
                                    </a>

                                    <div style ="border:1px solid black;" class="image-container">
                                        <!-- <div class="status-tag New">New</div> -->
                                        <a href="<?php echo base_url('UserController/view_single_inventory/'.$inventory->id); ?>">
                                            <img width="100%" height="180" src="<?php echo base_url('uploads/'.json_decode($inventory->featured_img)); ?>" class="img-responsive" /> 
                                        </a>
                                    </div>
                                    <div class="arrivals-details" >
                                        <div class="more-details">
                                            <span class="year-detail">
                                                Year: 
                                                <span class="colored-text"><?php echo $inventory->year; ?></span>
                                            </span>


                                            <span align="right" class="milage-detail" > 

                                                Mileage: 
                                                <span class="colored-text"><?php echo $inventory->mileage; ?> Miles</span>
                                                </span>

                                            <div class="clear"></div>
                                        </div>
                                        <!-- <p class="strong grid-location"> Nashville, Tennessee</p> -->
                                        <div class="price-detail">
                                            <span class="pull-left price-span">
                                                <p>
                                                    <span align="left"  class="price">Price</span>
                                                    <span class="price-figures">
                                                        $ <?php echo $inventory->price; ?>                                        
                                                    </span>
                                                </p>
                                            </span>

                                            <a  class="btn btn-default pull-right btn-inv-details" href="<?php echo base_url('UserController/view_single_inventory/'.$inventory->id); ?>">Details <i class="fas fa-chevron-right"></i> </a>
                                            <div class="clear"></div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        <?php endforeach; ?>
                    </div>
                </div>
            </div>
        </div>
    </div>
<div style =  "position:relative">
            <?php $this->load->view('user/search', ['search_results' =>         
 $search_results] ); ?>
      </div>
    </div>
        </div>
         </div>
<style>
         span.indent
    {
    padding-left :1.8em;
    }
   .side-widget h3 {
    background: #e0b414 !important;
   }

.form-button:hover {
    background: linear-gradient(#e0b414, #e0b414) !important;
}
.text-center {
text-align: center;
font-size: 15px;
}
.btn-inv-details:hover {
 background:  #e0b414 !important;
 </style>

The code is using the bootstrap and i am getting the search bar from the line: load->view('user/search', ['search_results' =>
$search_results] ); ?>

I want to move the bar above

0 Answers