Solved

Rendering Page with Panel

Posted on 2011-03-21
9
292 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
 

Author Comment

by:zrazak
ID: 35183337
The code sent does not create diagram as on left
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
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.…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

910 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now