Solved

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

Posted on 2009-07-09
6
304 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
[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
  • 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
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Suggested Solutions

Learn by example how to specify CSS selectors for Selenium WebDriver test automation software.
Although a lot of people devote their energy toward marketing for specific industries, there are some basic principles that can be applied to any sector imaginable. We’ll look at four steps to take and examine how those steps were put into action fo…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
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).

739 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