Php recursive function not working right

Report
Question
52 views

Please explain why do you think this question should be reported?

Report Cancel

I am a novice when it comes to Bootstrap and css in general. I would like a site with a fixed sidebar, fixed top nav and main content that scrolls.

The navbar is fixed and works ok. The layout of the sidebar and main content is fine too. The problem comes when I set the sidebar to fixed. The main content overlaps the sidebar.

I am using a basic grid layout:

Html Structure

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
<section class="row">
    <div class="col-sm-3 col-md-2 sidebar">
        <ul class="nav nav-sidebar">
            <li class="active"><a href="#">Overview</a></li>
            <li><a href="#">Reports</a></li>
            <li><a href="#">Analytics</a></li>
            <li><a href="#">Export</a></li>
        </ul>
    </div>
    <div class="col-sm-9">
        <h1 class="page-header">Dashboard</h1>
    </div>
</section>
                               

I have tried adding a margin to the left of the main content to push it over but it looks horrible when resized to smaller device.

What is the correct way to achieve a fixed sidebar whilst still maintaining responsiveness?

Thread Reply

  1. Umar Amin
    Got 1 Votes
    February 26, 2017 at 4:15 am

    Please briefly explain why you feel this answer should be reported .

    Report Cancel

    Set it as the font John Doe Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nam fringilla augue nec est tristique auctor. Donec non est at libero vulputate rutrum.

    public function popular($parent = null,$child = null)
      {     
        $products =  Product::with('subcategory')->with('subchild')->paginate(16)->sortByDesc('view_cache');
        return view('Frontend.listing.popular')->with(['products'=>$products]);
       }
       
       
       namespace AppProviders;
    
    use IlluminateContractsEventsDispatcher as DispatcherContract;
    use IlluminateFoundationSupportProvidersEventServiceProvider as ServiceProvider;
    
    class EventServiceProvider extends ServiceProvider
    {
        /**
         * The event listener mappings for the application.
         *
         * @var array
         */
        protected $listen = [
            'AppEventsSomeEvent' => [
                'AppListenersEventListener',
            ],
        ];
    
        /**
         * The subscriber classes to register.
         *
         * @var array
         */
        protected $subscribe = [
            'AppListenersUserEventListener',
        ];
    
        /**
         * Register any other events for your application.
         *
         * @param  IlluminateContractsEventsDispatcher  $events
         * @return void
         */
        public function boot(DispatcherContract $events)
        {
            parent::boot($events);
        }
    }
    																		 

  2. admin
    Got 1 Votes
    September 27, 2019 at 4:17 am

    Please briefly explain why you feel this answer should be reported .

    Report Cancel

    good job dear keep it up

  3. amjad
    October 4, 2019 at 5:42 pm

    Please briefly explain why you feel this answer should be reported .

    Report Cancel

    oh nice ans


    Attachment

Leave an answer

Browse

You may use these <abbr title="HyperText Markup Language">HTML</abbr> tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>