Solved

Web control (ascx page) will not position correctly on master page

Posted on 2009-07-09
6
296 Views
Last Modified: 2013-12-26
Greetings,

I have a control which is called by a master page.  The control is an editor with an info section above it  as seen in the picture.  These two objects are separate but should stay together.   The editor has a 'full screen' button or mode (circled in red).  When this button is selected, the editor will expand out nicely.  However, in actuality it is expanding out so far that it covers the master page section on the top and the information section of the editor goes away into la, la land.  

The master page section is directly above the editor info section and can be identified by the 'expander' line and the title called 'Label'.

As seen in the bottom picture, after the full screen mode is shut off, the editor goes out of it's boundry or won't go back into it's hole for lack of a better term.  Ok, it won't go back to it's righful position.

Anyone have any idea why this is happening?  Let me know what code you need to see......

Thanks
editor-before-full-screen.JPG
editor-after-full-screen.JPG
0
Comment
Question by:John500
  • 3
  • 3
6 Comments
 
LVL 96

Expert Comment

by:Bob Learned
ID: 24815874
Are you working with 3rd party controls, <div> elements, Panels, etc.?  What does the HTML look like?
0
 

Author Comment

by:John500
ID: 24816229
Hello,

The master page code is directly below which calls the conrol with 'EditorEntityNotice1'
--------------------------------------------------------------------------------------------------------------------------------
<%@ Page Language="VB" MasterPageFile="~/BF-MasterPage.master" AutoEventWireup="false" CodeFile="Editor_EntityNotice.aspx.vb" Inherits="Editor_EntityNotice" title="Untitled Page" %>
<%@ Register src="EditorEntityNotice.ascx" tagname="EditorEntityNotice" tagprefix="ucen1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server">

<div style="position:relative;width:100%;height:100%;overflow:auto">

<ucen1:EditorEntityNotice ID="EditorEntityNotice1" runat="server" />

</div>

</asp:Content>
--------------------------------------------------------------------------------------------------------------------------------

The code for the ASCX file is pretty long.  Which part of it are you interested in?
0
 
LVL 96

Accepted Solution

by:
Bob Learned earned 500 total points
ID: 24816274
Ok, so you have a content page, and an editor that is on all the pages.  

Position=relative, overflow=auto

Relative vs. absolute positioning:  the control will change depending on the other controls with relative, and won't move with absolute.
0
DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

 

Author Comment

by:John500
ID: 24816721
So in other words, I needed to try changing to 'absolute' - right?

I tried this but when it came time to switching out of full screen mode, the bottom of the page got extended and the top still wouldn't show the information box.  You can see by the picture below the top portion of the editor remains in full screen and won't go back to it's original position.

How about that 'overflow' setting?  Does have anything to do with this?

Thanks
editor-after-absolute-positionin.JPG
0
 
LVL 96

Expert Comment

by:Bob Learned
ID: 24817366
Is the "information box" on the master page, or content page?
0
 

Author Closing Comment

by:John500
ID: 31601666
Thanks again.  The 'absolute' positioning was key but when I removed the 'overflow' altogether it worked as I would hope....
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
An enjoyable and seamless user experience can go a long way on an eCommerce site. While a cohesive layout and engaging copy play roles in creating a positive user experience, some sites neglect aspects that seem marginal but in actuality prove very …
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
This tutorial demonstrates how to identify and create boundary or building outlines in Google Maps. In this example, I outline the boundaries of an enclosed skatepark within a community park.  Login to your Google Account, then  Google for "Google M…

816 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

10 Experts available now in Live!

Get 1:1 Help Now