Steps for aligning charts to the rightTo align charts properly

I am struggling to align the charts with the menu. Their heights are different than the menu on the left.

Menu div:

<nav>
  <div class="menu-item alpha"> 
  <h4><a href="index.aspx" style="color: #EDEDED">Home</a></h4>           

  <p>To Navigate to Home Page</p> 
</div>   

<div class="menu-item"> 
<h4><a href="#">KPIs</a></h4> <!-- colored bar --> 

<ul> <!-- expanding white area --> 
  <li><a href="#">Churn Rate</a></li> 
  <li><a href="#">Dormont Users</a></li> 
  <li><a href="#">Other</a></li> 
</ul> 

</div> 


</nav>

Table div:

       <table border="1" align="right" >
  <tr>
    <th>Chart 1</th>
    <th>Chart 2</th>
  </tr>
  <tr>
    <td>
    <asp:Chart ID="Chart1" runat="server" DataSourceID="SqlDataSource1">
        <Series>
            <asp:Series Name="Series1" ChartType="Line" XValueMember="Activity" YValueMembers="NumberOfStudents" YValuesPerPoint="2"></asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1"></asp:ChartArea>
        </ChartAreas>
    </asp:Chart>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:ConnectionString %>" ProviderName="<%$ ConnectionStrings:ConnectionString.ProviderName %>" SelectCommand="SELECT * FROM [FavouriteActivities]"></asp:SqlDataSource>
</td>
<td>
        <asp:Chart ID="Chart2" runat="server" DataSourceID="SqlDataSource1">
        <Series>
            <asp:Series Name="Series1" ChartType="FastPoint" XValueMember="Activity" YValueMembers="NumberOfStudents" YValuesPerPoint="2"></asp:Series>
        </Series>
        <ChartAreas>
            <asp:ChartArea Name="ChartArea1"></asp:ChartArea>
        </ChartAreas>
    </asp:Chart>
</td>
  </tr>
</table>

This is the current situation:

This is the desired layout:

Please assist me with this issue.

Answer №1

To prevent the two menu blocks from appearing side-by-side, apply a float to <nav> instead of menu-item:

CSS -

nav { 
   float: left;
}

table { 
   float: right;
}

Answer №2

Give this a shot for the navigation on the sidebar (be sure to pay attention to the float properties):

Add this to your CSS file

   menu-item alpha {float: left;}  

and insert this into your PHP / ASP / HTML page:

  <table border="1" align="right" style="float:right;">

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

The tab navigation feature is experiencing issues in Internet Explorer versions 7 and 8

I have successfully implemented a tab menu that functions well in Chrome and IE 9,10. However, it does not seem to work in IE 7 or 8. I am at a loss regarding what changes need to be made to my code. Could anyone provide assistance? Link to Code Example ...

The affix feature in Bootstrap's navbar fails to recognize the height of images

My navbar element affixes prematurely when placed below my header element, making it seem as if the image in the header does not exist. The navbar is meant to affix only when it reaches the top, but currently, it is affixing earlier. The code I used sets ...

How can PHP be used to showcase multiple results from a MySql query while handling errors?

I am looking for information on a specific category of items. In this case, I have 2 wines from Chile. The code below seems to be functioning correctly, but the foreach loop is causing the first output to overlap with the second one. As someone new to for ...

Struggling with organizing the layout of your HTML page? Let us lend

I am having difficulty with the layout of a page I'm working on. The lower page navigation is not positioning properly - it wraps below the left column instead of staying below the data columns. Additionally, the border for the navigation appears at t ...

Does the webworker function as a multi-thread?

For example: worker.postMessage(data1); worker.postMessage(data2); If there are multiple issues to be dealt with inside the web worker, would worker.postMessage(data2) block before completing data1? ...

Styling list items (li) on hover without using the li:

I have a menu where I am using the :after element. When I hover over a li in the menu, the hover effect also includes the :after element. HTML: <ul class="main-menu"> <li class="active"><a href="">Menu</a></li> <l ...

Utilize the toggle feature by retrieving the dynamic ID from ng-repeat within the scope

Hey there! I'm currently working on a UI that contains multiple links, and when clicked, each link should toggle to display different data. The challenge I'm facing is that the data is being generated dynamically using ng-repeat. How can I ensure ...

Ways to align the `<ol>` number at the top vertically

I'm having trouble aligning my <ol> numbers vertically at the top of the list. I've created a sample on CodePen. ol { list-style-type: decimal-leading-zero; font-size: 11px; } a { font-size: 80px; tex ...

The present item is being hovered over, despite having identical class and id attributes

Within a series of HTML elements organized in a loop, I am facing an issue with displaying only the current element when hovering over it. <div class="zlist"> <div class="vimg"> [{foreach from=gallery item=bla}] <img class="minimg" src="img ...

Add the variable's value to the input field

It is necessary for me to concatenate a numeric value, stored in a variable, with the input fields. For example: var number = 5; var text = $("#dropdown_id").val(); I wish to append the value of the variable 'number' to 'dropdown_id' ...

When placed in an absolute position, Overflow seems to be malfunctioning

Within a div that is positioned relatively, there is another div positioned absolutely. Despite setting overflow:hidden and border-radius on the main div, the inner div's edges are not contained within the main one, indicating that the overflow proper ...

Error encountered in Django when attempting to pass an SQL query due to an UnboundLocalError

When I encountered an issue: Environment: Request Method: POST Request URL: http://127.0.0.1:8000/mainpage.html Django Version: 3.2.12 Python Version: 3.7.4 Installed Applications: ['django.contrib.admin', 'django.contrib.auth' ...

What's the reason for the icon not updating in the responsive mode?

I am venturing into the world of responsive web design for the first time. My aim is to create a website menu that drops down when the menu icon is clicked, using the onclick command in JavaScript. However, upon inspecting my browser, I noticed an uncaught ...

Creating a competition schedule - pieces don't quite mesh

Having trouble getting my tournament bracket visuals to come together smoothly! Here is the CSS code I have: #tournament-holder{ width:708px; padding:20px 0 20px 15px; float:left; } .vertical-holder{ width:100px; padding-right:15px; float:left; } .horizo ...

Position the button at the bottom of a div

I am currently utilizing Bootstrap 4.5, however, the following is just a brief demonstration of my desired outcome. Within the dimensions of a fixed-width and height card, I aim to have the content occupy all remaining space while ensuring the button stay ...

Innovative and responsive web design strategies

Although I have a solid understanding of html, css, and JavaScript, I struggle with combining these skills effectively. My expertise lies in developing native apps for Android, where I focus on creating dynamic layouts using relative positions and sizes li ...

Error: knockoutjs - unable to locate ko

Here is the knockoutjs code that I have written: $(function () { function QuizViewModel() { var self = this; self.previousQuestions = ko.observableArray([]); self.questions = ko.observableArray([]); self.thisQuestion = ko.observable() ...

Minimizing the menu bar while scrolling down (bootstrap3)

Could anyone help me with creating a navigation-bar effect similar to the one seen on ? I want the bar to shrink and the logo to change after scrolling down my page. My website is built using bootstrap 3. Is there a simple way to achieve this effect with ...

How about incorporating AJAX into your HTML code?

I am currently in the process of developing an email system for a company that wishes to use it for sending emails. To achieve this, I have implemented a custom HTML editor for creating email content. My goal is to post the email contents to an external PH ...

What is the best way to style an image with CSS when it is not contained within a disabled parent element?

Struggling to find a way to add a hover effect to an image that is not inside a disabled element? Although it seems like the css selector below should do the trick, it doesn't quite work as expected. In this scenario, I only want the hover effect on e ...