Solved

Rendering Page with Panel

Posted on 2011-03-21
9
299 Views
Last Modified: 2012-06-21
I have a asp.net website that is in a format that has header, left panel, main, right panel, and footer like image on left. I am wanting to render the page  to look like image on right using java script to essentially remove left panel and place right panel below main.  Any help with code to do this is greatly appreciated.

Panel Image Result
0
Comment
Question by:zrazak
  • 4
  • 4
9 Comments
 
LVL 7

Expert Comment

by:nbove
ID: 35182962
Set widths on the panels and set the style property on them to "display:inline"

Here is an example of some code:
<div>Header</div>
<div style="display:inline">Left</div><div style="display:inline; border:1px solid">Main</div><div style="display:inline">Right</div>
<div>Footer</div>
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 35183079
post the current structure of divs (with code & style)
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 35183135
check this one

<style>div {border:1px solid gray} </style>

<div>Header</div>
<div style="display:inline" id=divLeft>Left</div>
<div style="display:inline" id=divMain>Main</div>
<div style="display:inline" id=divRight>Right</div>
<div>Footer</div>

and the one below
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>

<script>
$(document).ready(function() {
	$("#divLeft").hide();
	$("#divMain").css("display","");
	$("#divRight").css("display","");
});
</script>

<style>div {border:1px solid gray} </style>

<div>Header</div>
<div style="display:inline" id=divLeft>Left</div>
<div style="display:inline" id=divMain>Main</div>
<div style="display:inline" id=divRight>Right</div>
<div>Footer</div>

Open in new window

0
Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

 

Author Comment

by:zrazak
ID: 35183337
The code sent does not create diagram as on left
0
 

Author Comment

by:zrazak
ID: 35183462
I like the help that you provided.  I have set the div tags to panel tags and wanted to know if a width can be set to the panel left, panel main, and panel right to add up to 100% of screen?
0
 
LVL 51

Expert Comment

by:HainKurt
ID: 35183515
you can use this syntax

$("#divMain").css("width","300");
0
 

Author Comment

by:zrazak
ID: 35183608
i did that and didnt notice any render in screen?
0
 
LVL 51

Accepted Solution

by:
HainKurt earned 500 total points
ID: 35189511
this should be working fine...
<script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.4/jquery.min.js"></script>

<script>
$(document).ready(function() {
	$("#divLeft").hide();
	$("#divMain").css("display","");
	$("#divMain").css("width","300"); 
	$("#divRight").css("display","");
});
</script>

<style>div {border:1px solid gray} </style>

<div>Header</div>
<div style="display:inline" id=divLeft>Left</div>
<div style="display:inline" id=divMain>Main</div>
<div style="display:inline" id=divRight>Right</div>
<div>Footer</div>

Open in new window

0
 

Author Closing Comment

by:zrazak
ID: 35198406
Sorry for late response thanks
0

Featured Post

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Iteration Help (Asp.net VB) 5 24
Do alert on select 6 13
Search Item in Table 2 19
..ignore the Question 1 7
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Is your Office 365 signature not working the way you want it to? Are signature updates taking up too much of your time? Let's run through the most common problems that an IT administrator can encounter when dealing with Office 365 email signatures.
In this tutorial viewers will learn how to position overlapping items using z-index in CSS. They will also learn the restrictions on the z-index property.  Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Red.…
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question