[2 days left] What’s wrong with your cloud strategy? Learn why multicloud solutions matter with Nimble Storage.Register Now

x
?
Solved

Master page with DIVS in ASP.Net

Posted on 2009-03-30
13
Medium Priority
?
254 Views
Last Modified: 2013-12-17
Greetings all

I have a standard design for an application which consists of the usual header, followed bya  "body" which has two columns and underneath that a footer.  

If teh right column is shorter then the left, then the "footer" floats up under the right, alongside the left. I can get aroiund this by setting lengths fo both columns.

Problem is that this layout is the same for many pages and thus makes sense to do a a MatserPage. If that is so, how do I set the Div lengths, which will vary from page to page? And, is there nbot a better wya to do this?

In advance, thanks!!

   allanmark
0
Comment
Question by:allanmark
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 7
  • 4
  • 2
13 Comments
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 24016804
i will suggest you to define your master page in the following manner
this will make sure that your divs will render in correct place

<table>
   <tr>
      <td colspan=2>
           HEADER
      </td>
    </tr>
   <tr>
      <td>
          Right Column
      </td>
      <td>
           Left Column
      </td>
    </tr>
      <td colspan=2>
           Footer
      </td>
    </tr>
</table>
0
 

Author Comment

by:allanmark
ID: 24016891
Sorry ... what I should have also sais was ....

Each page will have different content for BOTH the left and teh right columns.
0
 
LVL 26

Expert Comment

by:Anurag Thakur
ID: 24016919
master page will just have the content place holders and the aspx pages inheriting from the master page will implement the content place holders so the rendering will be as required
0
Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

 
LVL 19

Accepted Solution

by:
daveamour earned 2000 total points
ID: 24017287
It is more acceptable these days to avoid tables for layout like this and use CSS instead eg:
http://www.strictlycss.com/examples/three-column-layout-9.asp
 
0
 

Author Comment

by:allanmark
ID: 24017372
I'm happy with the concept of CSS.

What I am not to sure of is how to handle the different column lengths in the various pages.
0
 
LVL 19

Expert Comment

by:daveamour
ID: 24017381
Columns should resize to accommodate the content within them.
0
 

Author Comment

by:allanmark
ID: 24017443
Sorry ... I'm really getting myself knotted up .. what I meant was ...

Two DIVS / columns (left and right), with left set as "float: left" and  a DIV as a footer underneath -- if teh right column has less content then the footer scrolls up underneath it, alongside the left. I can't figure out the css to stop this.
0
 
LVL 19

Expert Comment

by:daveamour
ID: 24017450
Ok I see
I'm not bad with CSS but not an expert.  You will have a better chance posting this in the CSS area:
http://www.experts-exchange.com/Web_Development/Web_Languages-Standards/CSS/
 
 
0
 

Author Comment

by:allanmark
ID: 24017640
Got it! Had a look at the site and followed a link.

The answer - enacse the lot in a wrapper div:-

      <div id="wrapper">       
        
          <div id="left" class="leftnav">      
                   <asp:ContentPlaceHolder ID="leftnav" runat="server">
                </asp:ContentPlaceHolder>
           </div>
       
           <div id="right" class="rightnav">      
              <asp:ContentPlaceHolder ID="righnav" runat="server">
              </asp:ContentPlaceHolder>
          </div>
     
      <!-- <div id="wrapper">        -->
      </div>

0
 

Author Comment

by:allanmark
ID: 24017653
Sorry! Doesn't work!  -- I hadn't done a refresh!!
0
 

Author Comment

by:allanmark
ID: 24018083
Working!  Just needed to adjust a few things!

For interest sake:

http://imaginekitty.com/phonyBorders/phonyBorders.html  -- ha a look at source view and got what I needed!
0
 
LVL 19

Expert Comment

by:daveamour
ID: 24018090
Nice one
0
 

Author Closing Comment

by:allanmark
ID: 31564216
Points are yours - your site suggestion led to the solution!  Thank you!!
0

Featured Post

NEW Veeam Agent for Microsoft Windows

Backup and recover physical and cloud-based servers and workstations, as well as endpoint devices that belong to remote users. Avoid downtime and data loss quickly and easily for Windows-based physical or public cloud-based workloads!

Question has a verified solution.

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

I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…

649 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