Solved

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

Posted on 2009-07-09
6
286 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
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 

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

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Enums (shorthand for ‘enumerations’) are not often used by programmers but they can be quite valuable when they are.  What are they? An Enum is just a type of variable like a string or an Integer, but in this case one that you create that contains…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
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…
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

758 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

21 Experts available now in Live!

Get 1:1 Help Now