Solved

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

Posted on 2009-07-09
6
308 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
Independent Software Vendors: 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

How To Reduce Deployment Times With Pre-Baked AMIs

Even if we can't include all the files in the base image, we can sometimes include some of the larger files that we would otherwise have to download, and we can also sometimes remove the most time-consuming steps. This can help a lot with reducing deployment times.

Question has a verified solution.

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

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…
Australian government abolished Visa 457 earlier this April and this article describes how this decision might affect Australian IT scene and IT experts.
Viewers will get an overview of the benefits and risks of using Bitcoin to accept payments. What Bitcoin is: Legality: Risks: Benefits: Which businesses are best suited?: Other things you should know: How to get started:
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…

615 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