Tips on making sure the right sidebar utilizes the available screen space to its fullest potential

On the master page, you will find 2 columns:

  • The left column is a JQuery UI accordion that can be resized using JQuery UI resizable.
  • The right column (main div) should take up the remaining horizontal space on the screen.

To achieve this layout, the following width styles are used. However, when the accordion width is increased by dragging the mouse, the content in the main div wraps to the next line.

How can we ensure that the main div always appears to the right of the accordion after resizing? And how do we remove the fixed width of 81% to make sure the main div utilizes the remaining space at all times?

<script type="text/javascript">
    $( "#accordion" ).resizable({       });
</script>

<body>
    <div id="container">
        <div id="accordion" style="margin: 0; clear: left; float: left; width: 17%">
            <% Html.RenderPartial("MainMenu"); %>
        </div>

        <div id="main" style="float: left; width: 81%">
            this is main content
        </div>
    </div>
</body>

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Chrome displays linear-gradient with choppy rendering

I am attempting to enhance a page by adding a ribbon using CSS3 linear-gradients, but I have noticed that the way Chrome renders it is not as attractive as Firefox or IE. The color stops in Chrome appear pixelated, and unfortunately using vendor prefixed p ...

What methods can be used to beautify Html 5 files in Java or Groovy?

Is it possible to pretty-print HTML5 files using libraries in Java or Groovy? While I know there are classes available for pretty-printing XML in Groovy, it won't work for HTML5 since it's not necessarily well-formed. Are there any solutions spec ...

Automate the process of modifying specific data in tables through Javascript

I've been attempting to replicate the appearance of a stock-exchange board, but I'm encountering difficulties in updating text automatically without interrupting another. My attempts so far: var textPositive = ["2.0%", "1.7%" ...

Guide to positioning front layer in CSS3

I am currently working on a page and have added an "Under Construction" banner to indicate it is not yet finished. Could someone assist me in bringing the png to the forefront on this link? ...

The navigation bar and text subtly shift when displayed on various devices or when the window size is adjusted

Hello, I am brand new to web development and have encountered an issue on my website. Whenever the window is resized or viewed on a different screen, the navigation bar (which consists of rectangles and triangles) and text elements start moving around and ...

The table columns are expanding in width with each click of the "show column" button

https://i.sstatic.net/aZirB.png https://i.sstatic.net/ZC3IP.png every time I click on the button to show or hide certain columns in the table, the width of the columns keeps increasing gradually. Is there a solution for this issue? I am using DataTables wi ...

Issue with ng-src

The main issue I am encountering involves using ng-src="" to dynamically add images from my JSON file. However, I have noticed that the images are not being displayed when using ng-src="" within the img element in the HTML. Upon inspecting the element, I ...

Press the button to update several span elements

Imagine I have multiple span elements like this: <span>A</span> <span>B</span> <span>C</span> <span>D</span> and a div element (which will be converted to a button later) named "change". <div id="chan ...

W3C does not provide validation for the Viewport

Why is W3C not validating my viewport meta tag? <title>DIDIx13</title> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no" /> <!-- I'm getting a warning "Consider ...

Can you explain the purpose of the .col-form-label class in Bootstrap and how it affects labels?

Here in the initial label, the class is specifically identified. <form> <div class="form-group row"> <label for="staticEmail" class="col-sm-2 col-form-label">Email Address</label> <div ...

Layering properly with z-index in versions of IE older than IE9

I am currently working on developing a straightforward plugin to create HTML5 placeholders for Internet Explorer 9 and earlier versions. My current issue is that even though I have assigned a higher z-index to my input field, the label element still appear ...

Do the last block in the table occupy the remaining space in the row?

Trying to create an HTML email calendar and struggling with getting the last td to fill the remaining space without affecting the width of other rows. Is there a way to increase the width of just the 4th block on the last row to fill the empty space? Here ...

Unable to extract content enclosed within the span tags

I am struggling to extract the text from the constantly changing span tag (568,789,073,292). The HTML snippet is provided below: Despite trying the following xpath code, I still can't retrieve the text. xpath=(//div[@id='RxValidPackets']/sp ...

How can I add rows to the tbody of a table that is already inside a div container?

I have an existing table and I want to append a tbody element to it. Below is an example of the HTML table: <div id="myDiv"> <table class="myTable"> <thead> <tr> <th>ID</th> ...

What is the process for applying the source from an object while utilizing video-js?

I've been struggling to use a video player for streaming m3u8 videos. The code below works, but I want to dynamically set the source using an object. <video id="my-video" class="video-js" auto ...

Thrilling visual loops in motion with CSS animations

Currently, I am working on developing a captivating 'pulsating rings' animation that revolves around a circular image with the use of CSS animations. The image itself is a circle measuring 400px in width. Although I have successfully implemented ...

Having trouble with disabling selection in a jQuery Sortable/Draggable list?

I have implemented HTML5 Sortable for creating a draggable and sortable list on my website. Challenge I tried using jQuery's disableSelection() function to prevent the list items from being moved from right to left, but it is not working as expected ...

Tips for updating the hover effect color on Material UI select component options in a React JS application

I've been trying to customize the hover effect for the options in the mui Auto Complete component drop-down menu, but I'm having trouble finding the right method to do so. Here is the hover effect that I want to change: Image I'd like to u ...

Utilize JavaScript conditions to dynamically apply styles within your web application

I am facing a challenge with managing two separate <style> tags that each contain a large number of styles and media queries. The issue is that one set of styles is intended for desktop users, while the other is meant for mobile users. When both se ...

Challenges with moving images in Unslider

There seems to be an issue with the unslider-arrows on the unslider banner. The images are not sliding properly when transitioning to the next image without user input. Instead, they resize from small to full size starting at the top of the .banner div. ...