Solved

Rendering Page with Panel

Posted on 2011-03-21
9
296 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
Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

 

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

Gigs: Get Your Project Delivered by an Expert

Select from freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely and get projects done right.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
HTML5 save .Dat to server side 20 45
Browser Chrome downloads colored link 5 40
Changing Two Areas of a Page 5 16
Please explain the parts of these 2 LINQ expressions 3 27
Showing your events from Google Calendar in Google Maps Why? I travel all week and I thought it would be ideal if staff in office knew where I was based on my calendar. (OK real reason: my son wanted to see where I would be working, and I thoug…
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.
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
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).

776 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