473,500 Members | 1,963 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Problem with DIV height

maliksleo
115 New Member
Hi All

i have a div tag of 100% height and width with opacity filter but when i use it, it shows height half of the page means it covers half page and leave the other half.
can any body solve my problem ill be thankfull
i m using it for update progress in asp.net

regards
maliksleo
Apr 1 '09 #1
12 3769
David Laakso
397 Recognized Expert Contributor
Point us to it. State your OS and browser(s).
Apr 1 '09 #2
maliksleo
115 New Member
@David Laakso
im using windows XP and my browsers are IE 7 and Firefox the problem is being faced in both
Apr 2 '09 #3
David Laakso
397 Recognized Expert Contributor
No Ticky. No Shirt.

Point us to it. In plain English, provide a clickable link to the problem page in your post to the forum. Can't fix what can't be seen.
Apr 3 '09 #4
maliksleo
115 New Member
@David Laakso

My work is not available at internet yet so i cant show it to you but i m sending you the code below and i m very thankful to you for your kind consideration.

this is my progress bar
Expand|Select|Wrap|Line Numbers
  1. <asp:UpdateProgress ID="UpdateProgress1" runat="server">
  2.         <progresstemplate>
  3.     <div style="width: 130%; height: 175%; background-color:#999999; filter:alpha(opacity=85); opacity:0.7; position:absolute; left:-15%; top:0; text-align:center; vertical-align:middle">
  4.        <img src="images/progress.gif" style="margin-top:32%" />
  5.     </div>
  6.     </progresstemplate>
  7.     </asp:UpdateProgress>
as my page ends in the midle of the screen thats why i give height 175% for IE
but it acts different in firefox, in firefox the hight of div tag is 175% of screen area

is this code in enough for you?

regards maliksleo
Apr 3 '09 #5
drhowarddrfine
7,435 Recognized Expert Expert
Most people do not use ASP or .NET so you must supply the generated markup for us to help.

Percentages are relative to something else. In this case, it would be the parent element. If you set something to, say, 50%, then it's 50% of what? The parent element. But what is the parent set to?

Ignore what IE is doing since it's probably wrong. Follow FF while you're testing this.
Apr 3 '09 #6
maliksleo
115 New Member
Thanks to all for your help

my problem is solved i just changed the position from absolute to fixed and its working great in IE and FF

maliksleo
Apr 6 '09 #7
drhowarddrfine
7,435 Recognized Expert Expert
Probably the worst solution ever but....
Apr 6 '09 #8
maliksleo
115 New Member
@drhowarddrfine
Thanks for your comliment but as for a beginer i think its not worst if u have any other solution then give it to me my markup is generated below

Expand|Select|Wrap|Line Numbers
  1. <body>
  2.  
  3.     <form name="aspnetForm" method="post" action="register.aspx" onsubmit="javascript:return WebForm_OnSubmit();" id="aspnetForm">
  4. <div>
  5. <input type="hidden" name="__EVENTTARGET" id="__EVENTTARGET" value="" />
  6. <input type="hidden" name="__EVENTARGUMENT" id="__EVENTARGUMENT" value="" />
  7. <input type="hidden" name="__LASTFOCUS" id="__LASTFOCUS" value="" />
  8. <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwUJNDQ2NDEwNDc5D2QWAmYPZBYCAgMPZBYGAgcPDxYCHgRUZXh0BQpqb2Igc2Vla2VyZGQCCQ8PFgIfAAUFbG9naW5kZAITD2QWBgIVDxAPFgIeC18hRGF0YUJvdW5kZ2QQFQQHQWZnaGFuaQhFZ3lwdGlhbglQYWtpc3RhbmkGU2VsZWN0FQQHQWZnaGFuaQhFZ3lwdGlhbglQYWtpc3RhbmkGU2VsZWN0FCsDBGdnZ2dkZAIhD2QWAmYPZBYGAgIPEA8WAh8BZ2QQFRUMIEFmZ2hhbmlzdGFuCCBCYWxnaXVtCyBCYW5nbGFkZXNoByBDYW5hZGEGIENoaW5hByBGcmFuY2UGIEluZGlhBSBJcmFuBiBOZXBhbAkgUGFraXN0YW4TIFJ1c3NpYW4gRmVkZXJhdGlvbg0gU2F1ZGkgQXJhYmlhDSBTb3V0aCBBZnJpY2EKIFNyaSBMYW5rYQYgU3VkYW4HIFR1cmtleRUgVW5pdGVkIEFyYWIgRW1pcmF0ZXMPIFVuaXRlZCBLaW5nZG9tDiBVbml0ZWQgU3RhdGVzBW90aGVyBlNlbGVjdBUVDCBBZmdoYW5pc3RhbgggQmFsZ2l1bQsgQmFuZ2xhZGVzaAcgQ2FuYWRhBiBDaGluYQcgRnJhbmNlBiBJbmRpYQUgSXJhbgYgTmVwYWwJIFBha2lzdGFuEyBSdXNzaWFuIEZlZGVyYXRpb24NIFNhdWRpIEFyYWJpYQ0gU291dGggQWZyaWNhCiBTcmkgTGFua2EGIFN1ZGFuByBUdXJrZXkVIFVuaXRlZCBBcmFiIEVtaXJhdGVzDyBVbml0ZWQgS2luZ2RvbQ4gVW5pdGVkIFN0YXRlcwVvdGhlcgZTZWxlY3QUKwMVZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZ2dnZGQCBw8QDxYCHwFnZBAVAQZTZWxlY3QVAQZTZWxlY3QUKwMBZ2RkAggPD2QPEBYBZhYBFgIeDlBhcmFtZXRlclZhbHVlBQZTZWxlY3QWAWZkZAIqDxAPFgIfAWdkEBUMCEF1ZGl0aW5nEUNpdmlsIEVuZ2VuaWVyaW5nB0ZpbmFuY2UOSHVtYW4gUmVzb3VyY2ULSVQtSGFyZHdhcmULSVQtU29mdHdhcmUJTWFya2V0aW5nB01lZGljYWwKTmV0d29ya2luZwZTZWxlY3QQVGVsZWNvbXVuaWNhdGlvbg5Ub3AgTWFuYWdlbWVudBUMCEF1ZGl0aW5nEUNpdmlsIEVuZ2VuaWVyaW5nB0ZpbmFuY2UOSHVtYW4gUmVzb3VyY2ULSVQtSGFyZHdhcmULSVQtU29mdHdhcmUJTWFya2V0aW5nB01lZGljYWwKTmV0d29ya2luZwZTZWxlY3QQVGVsZWNvbXVuaWNhdGlvbg5Ub3AgTWFuYWdlbWVudBQrAwxnZ2dnZ2dnZ2dnZ2dkZBgBBR5fX0NvbnRyb2xzUmVxdWlyZVBvc3RCYWNrS2V5X18WAQUSY3RsMDAkSW1hZ2VCdXR0b24xF2K3YjVbHrs/7GrpOGGOsXURkpM=" />
  9. </div>
  10.  
  11. <script type="text/javascript">
  12. <!--
  13. var theForm = document.forms['aspnetForm'];
  14. if (!theForm) {
  15.     theForm = document.aspnetForm;
  16. }
  17. function __doPostBack(eventTarget, eventArgument) {
  18.     if (!theForm.onsubmit || (theForm.onsubmit() != false)) {
  19.         theForm.__EVENTTARGET.value = eventTarget;
  20.         theForm.__EVENTARGUMENT.value = eventArgument;
  21.         theForm.submit();
  22.     }
  23. }
  24. // -->
  25. </script>
  26.  
  27.  
  28.  
  29. <script type="text/javascript">
  30. <!--
  31. function WebForm_OnSubmit() {
  32. if (typeof(ValidatorOnSubmit) == "function" && ValidatorOnSubmit() == false) return false;
  33. return true;
  34. }
  35. // -->
  36. </script>
  37.  
  38.     <div id="process">
  39.         <div style="text-align: center">
  40.  
  41.             <div style="text-align: center; background-color: transparent;">
  42.             <h3>
  43.                 <table style="height:auto; vertical-align:top; margin-left: 10%; margin-right: 10%; position: absolute; top: 0px; left: 0px;" width="80%">
  44.                     <tr>
  45.                         <td class="bgcolor" style="width: 100%; text-align: left; background-color: #e9f2f8;">
  46.                             <a id="ctl00_HyperLink1">Home</a>
  47.                             &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  48.  
  49.                             &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  50.                             &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  51.  
  52.                             &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  53.                             &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  54.  
  55.                             &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
  56.                             &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
  57.  
  58.                             <a id="ctl00_HyperLink2" href="mailto:maliksleo@gmail.com?subject=error:">Report Bug</a></td>
  59.                     </tr>
  60.                     <tr>
  61.                         <td style="width: 100%; text-align: left; vertical-align: top;" class="bgcolor" height="auto">
  62.                             <table style="width: 100%">
  63.                                 <tr>
  64.                                     <td style="width: 33%">
  65.                             <input type="image" name="ctl00$ImageButton1" id="ctl00_ImageButton1" src="images/bannerpic.gif" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$ImageButton1&quot;, &quot;&quot;, true, &quot;&quot;, &quot;&quot;, false, false))" style="border-width:0px;position: static;" /></td>
  66.  
  67.                                     <td style="width: 33%; text-align: center">
  68.                                         Welcome<br />
  69.                                         <span id="ctl00_Label1">job seeker</span><br />
  70.                                         <a id="ctl00_lbtnlogout" href="javascript:__doPostBack('ctl00$lbtnlogout','')">login</a>
  71.                                         <span style="color: #0000ff">
  72.                                             <a id="ctl00_lbtnreg" href="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;ctl00$lbtnreg&quot;, &quot;&quot;, false, &quot;&quot;, &quot;register.aspx&quot;, false, true))">Register</a></span></td>
  73.                                     <td style="vertical-align: top; width: 33%; text-align: right">
  74.  
  75.                                         </td>
  76.                                 </tr>
  77.                             </table>
  78.                         </td>
  79.                     </tr>
  80.                     <tr>
  81.                         <td style="width: 100%; text-align: center">
  82.                             <div style="text-align: center; width:auto">
  83.                             </div>
  84.  
  85.  
  86.                             <div id="ctl00_Panel2" class="btncolor" style="width:100%;">
  87.  
  88.                                             links removed
  89. </div>
  90.                         </td>
  91.                     </tr>
  92.  
  93.                     <tr>
  94.                         <td style="width: 100%; height: 7px" class="bgcolor">
  95.  
  96.     <script type="text/javascript">
  97. //<![CDATA[
  98. Sys.WebForms.PageRequestManager._initialize('ctl00$ContentPlaceHolder2$ScriptManager1', document.getElementById('aspnetForm'));
  99. Sys.WebForms.PageRequestManager.getInstance()._updateControls(['tctl00$ContentPlaceHolder1$UpdatePanel1','tctl00$ContentPlaceHolder1$UpdatePanel2'], [], [], 90);
  100. //]]>
  101. </script>
  102.  
  103.     <div id="ctl00_ContentPlaceHolder2_UpdateProgress1" style="display:none;">
  104.  
  105.             <div style="width: 100%; height: 100%; background-color: #999999; filter: alpha(opacity=85);
  106.                 opacity: 0.7; position:fixed; left: 0px; top: 0px; bottom:0px; right:0px; text-align: center; vertical-align: middle; z-index:100">
  107.                 <img src="images/process.gif" style="margin-top: 32%" />
  108.             </div>
  109.  
  110.  
Apr 7 '09 #9
drhowarddrfine
7,435 Recognized Expert Expert
My complaint is using 'fixed' is a hack and not a solution. The problem probably was that, when you use absolute positioning, it places the element relative to the previous positioned element, but there is no previously positioned element. Simply making the parent of that div 'position:relative' would have solved the problem.
Apr 7 '09 #10
maliksleo
115 New Member
@drhowarddrfine
now i got your point that if relative position is selected then it will be relevent to the parent div or td or any such tag before it and in case of fixed it will be fixed and relevency issue will not matter.
one more thing is there any problem of using fixed or its just fine in my case? as i m using master pages and i dont know which div will be acting as parent while page is running.

thanks for your help "drhowarddrfine"
maliksleo
Apr 7 '09 #11
drhowarddrfine
7,435 Recognized Expert Expert
@maliksleo
Exactly.
one more thing is there any problem of using fixed or its just fine in my case?
'fixed' does not work in IE<7 and is buggy in IE7+. Fixed is relative to the viewport and not any one element and, otherwise, behaves like an absolutely positioned element.
Apr 7 '09 #12
maliksleo
115 New Member
thanks alot for guiding me in this matter i m realy thankfull

thanks
maliksleo
Apr 8 '09 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

3
533
by: Mikael Hellström | last post by:
Hi all... I hava a problem . This pice of code (menu) works well with ie but don't work with netscape 6.2 .. why? Please tell me how i can get this to work. My site have the adress...
4
3814
by: JesusFreak | last post by:
From: us_traveller@yahoo.com (JesusFreak) Newsgroups: microsoft.public.scripting.jscript Subject: toolbar script problem NNTP-Posting-Host: 192.92.126.136 Recently, I downloaded the following...
6
2687
by: B McDonald | last post by:
Hi. I am trying to straighten out some DIV issues in the rendering of my no-tables CSS website. Right now the biggest issue is trying to render 2 columns several DIVs deep in the box model for my...
1
5618
by: delerious | last post by:
Could someone please take a look at this page: http://home.comcast.net/~delerious1/index11.html The set of links on the left should not have any whitespace between them, and the set of links...
0
1497
by: Thomas Scheiderich | last post by:
I have a table that has 3 image slices. The middle slice changes size based on size of browser window. This works great. My client wants the date to show over the image on the right. So what I...
2
16393
by: nino9stars | last post by:
Hello, I have just started messing with absolute positioning on webpages, and it definitely let's you do some creative things. Well, after much searching and help, I got the images I was using...
1
1420
by: kchaitanya | last post by:
I have created a master page. When I am adding this master page to .aspx files which are in the root directory, it is working fine. When , I am adding master page to .aspx files which are in sub...
5
1876
by: creative1 | last post by:
hi everyone, I am struck in layout of my site. Im using 1024 fixed width layout. I have a site layout designed in psd files. Bisically I have to stick with that design tightly and I am asked not to...
2
2994
by: swethak | last post by:
hi , i write the code in .htm file. It is in cgi-bin/searches/one.htm.In that i write a form submitting and validations.But validations are not worked in that .htm file. I used the same code in my...
10
2342
by: Constantine AI | last post by:
Hi i am having a little problem with an equation function that was created from all your help previously. The function works fine itself but with a small glitch within it. Here is the function...
0
7136
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7232
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7397
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5490
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4923
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4611
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3106
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1430
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
316
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.