[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Keep table size?

Posted on 2004-11-03
13
Medium Priority
?
189 Views
Last Modified: 2010-04-07
Hi,

I have a banner at the top of my site that is divided into two parts. Half is a small Flash movie, and the other half is the rest of the banner with two buttons. The problem I'm having is that for some reason, when my browser window opens, the flash file is often pushed up, so that it is not aligned with the rest of the banner. Whenever I press "refresh" it instantly aligns.

Why does this happen? Is there a way I can fix this?

thanks,
allana
0
Comment
Question by:MMsabry
  • 5
  • 3
  • 3
  • +1
13 Comments
 
LVL 10

Expert Comment

by:rockmansattic
ID: 12484637
do you have a online version we can see?

Rockman
0
 
LVL 6

Expert Comment

by:Fahdmurtaza
ID: 12484684
Yes without the sample html of your page how can it help us. I just did a similar thing however a couple of days ago at the address
http://cc.1asphost.com/fahdi/apnahazara/
Regards,
Fahd Murtaza
0
 
LVL 6

Expert Comment

by:Fahdmurtaza
ID: 12484719
Yes without the sample html of your page how can it help us. I just did a similar thing, however a couple of days ago at the address
http://cc.1asphost.com/fahdi/apnahazara/
If this helps use it for your needs or even tell us the online sample address of your problematic thingy.
Regards,
Fahd Murtaza
0
Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

 

Author Comment

by:MMsabry
ID: 12492015
you can check it out at http://www.nanoinsight.net/venue.htm

sometimes it loads fine, but then other times, it will not lineup properly and as I said before, the page needs to be reloaded and then its fine. but i'd like to know why its getting shifted

thanks
allana
0
 
LVL 10

Expert Comment

by:rockmansattic
ID: 12493176
looks fine to me
loads  IE. firefox Well, but Ill look at the code closer.

Rockman
0
 
LVL 6

Expert Comment

by:Fahdmurtaza
ID: 12502197
Well it loaded fine with my ie6. Which browser is being used by you?
Regards,
Fahd Murtaza
0
 

Author Comment

by:MMsabry
ID: 12521751
i'm using mozilla 1.6 and ie6

perhaps check out this link: http://www.nanoinsight.net/accomm.htm
when i opened it this time, to this link the banner was skewed again. its hard for me to tell, because as i said, when i refresh the page it often corrects itself, so i'm not sure if it's only a problem i've got on specific pages, or if i've somehow done something slightly differently on some of them which causes the problem (such as the accomm and the venue pages - the link i posted before)
0
 
LVL 2

Accepted Solution

by:
sg7_biz earned 2000 total points
ID: 12569038
Basically you are getting the table displayed bigger due to the browser thinking it need the space for something.

Browsers will ignore multiple spaces but it still displays 1 of them, so by makeing your code tidy the spaces can sometimes give you strange results, should not be the case but sometimes just is.

Try making sure every cell is defined hight and width, also edit the code so you don't have line returns or spaces between the end of your emmbeded table and the table cell you put it in.

I also when I have problems try to remove line returns and spaces between table rows and cells.
eg.
<tr><td width="157" height="20"><img src="??.gif" width="157" height="20"></td></tr>


=======

<table width="715" height="89" border="0" cellpadding="0" cellspacing="0">
  <tr>
    <td width="502" height="89"><object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,29,0" width="502" height="89">
        <param name="movie" value="/Flash/nanomorph.swf" />
        <param name="quality" value="high" />
        <embed src="/Flash/nanomorph.swf" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="502" height="89"></embed>
      </object>
    </td>
    <td width="157" height="89"><table align="left" border="0" cellpadding="0" cellspacing="0" width="157">
        <tr><td width="157" height="20"><img src="heading/heading_r1_c2.gif" alt="" name="heading_r1_c2" width="157" height="20" border="0" id="heading_r1_c2" /></td></tr>
        <tr><td width="157" height="20"><a href="https://www648.ssldomain.com/sabrycorp/Nano/enteraccount.cfm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('heading_r2_c2','','heading/heading_f2.gif',1)"><img src="heading/heading.gif" alt="" name="heading_r2_c2" width="157" height="20" border="0" id="heading_r2_c2" /></a></td></tr>
        <tr><td width="157" height="6"><img src="heading/heading_r3_c2.gif" alt="" name="heading_r3_c2" width="157" height="6" border="0" id="heading_r3_c2" /></td></tr>
        <tr><td width="157" height="20"><a href="/deadline.htm" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('heading_r4_c2','','heading/heading_r4_c2_f2.gif',1);"><img src="heading/heading_r4_c2.gif" alt="" name="heading_r4_c2" width="157" height="20" border="0" id="heading_r4_c2" /></a></td></tr>
        <tr><td width="157" height="23"><img src="heading/heading_r5_c2.gif" alt="" name="heading_r5_c2" width="157" height="23" border="0" id="heading_r5_c2" /></td></tr>
      </table></td>
    <td width="56" height="89"><img src="heading/heading_r1_c3.gif" alt="" name="heading_r1_c3" width="56" height="89" border="0" id="heading_r1_c3" /></td>
  </tr>
</table>
0
 

Author Comment

by:MMsabry
ID: 12652366
hi, sorry so late for my reply, took me a bit of time to try testing this out
i've followed your example above getting rid of spaces and putting the height, but i still get the flash pres shifting from time to time. the randomness of when and where it shifts also is somehow strange - it is not every time i open a certain page that it will be shifted (i was very excited when i started adding the changes you mentioned and it seemed to be working, until i checked out how the 3rd page loaded and it again was shifted)

is it somehow a result of how i've nested the tables? shouldn't nested tables avoid such problems?
thanks again,
allana
0
 
LVL 2

Assisted Solution

by:sg7_biz
sg7_biz earned 2000 total points
ID: 12652747
Yes and no.

Nested table are easyer to get your head round, thats why I do it that way, and I also find you can do some things quicker when nested. There are just some layouts I can't get to work without hours of debuging, unless I nest.

For your problem, I am starting to think may be you should just use a layer for the flash animation, as the layer is fixed and would not effect the table.

The problem at the moment is working out what makes your table pop, something is making it think it needs more space, and like a said in my other post, space and line returns can make a difference, stange but true. But as you have done that we are running out of options.

I would try a few test, replace the flash with a fixed image, see if you still get the prob. Also I find that sometimes a small error on a page will make the whole page go funny. So try just the header on it's own on a clean page.

If you can get the header working on it's own page then you might have an error somewhere else.

Last resort I sometimes find that a table I created then changed around and spent a time working on before I was happy, would give me problems. So I would create it again in a new page to exactly how I wanted it, know that I have worked it out. (Again this tends to get sort of little errors that you over look in the code and is some times a faster way to correct the error)

Saying all this I have looked at the code and can't see anything that jumps at me.

See how you get on, and shout if you want to try using a layer.
(Tip to work on the mac as well, the layer has to be at the top of your code, PC will always start from the top of the page with the layer x,y but mac starts from where you put the code, like an offset which I must say is not helpful.)

Mark
0
 

Author Comment

by:MMsabry
ID: 12721335
hi Mark,
thanks for your advice,
the flash part of the header was added only recently, before that there was a static image and it did not jump at all, only started doing that when i added the flash. when i put the header with the flash on a page by itself it also does not jump - so i'm suspecting it's as you said, something off kelter somewhere else on the page. this was my first website, so as i made it I  was, unfortunately, not very consistent with the pages (learning as i went along), I believe some pages I added the header differently than on others...so when i have time i will look more closely and try to find discrepencies in my code between the pages that are problematic and those which aren't. for the moment i still haven't found the solution,  but i really thank you for your suggestions and when i have more time i will try to go over it all with a finer comb,

I've tried adding layers before on other parts of the site, but I found they (also) were jumping around ;-p, could you tell me how i can use the layer in my heading without it jumping?

thanks,
allana





0
 
LVL 2

Expert Comment

by:sg7_biz
ID: 12721945
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
</script>
</head>

<body>
<div id="Flashlayer" style="position:absolute; width:502px; height:89px; z-index:1; left: 148px; top: 13px; overflow: hidden;">
  <table width="600" height="100" border="0" cellpadding="0" cellspacing="0">
    <tr>
      <td width="502" height="89">&nbsp;</td>
      <td bgcolor="#FF0000">&nbsp;</td>
    </tr>
    <tr>
      <td bgcolor="#0000FF">&nbsp;</td>
      <td bgcolor="#00FF00">&nbsp;</td>
    </tr>
  </table>
</div>

<p>Make sure you code is under the lay, it goes here. Even the code for the
  header the layer sits on has to go under it. (ALL LAYERS AT THE TOP OF YOUR CODE!)</p>
<p>Now in the example above only the main table cell can be seen the others,
  which have colour backgrounds will not show up.</p>
<p>Note the page in Dreamweaver might not look correct, you have to preview the code in a browser.</p>
</body>
</html>
0
 

Author Comment

by:MMsabry
ID: 12724191
wow, thanks again!
will try this out!

best regards,
allana
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For those who don't know, Adobe Dreamweaver is a popular commercial web editor that enables you to design, build and manage complex websites. The editor is a WYSIWYG (What You See Is What You Get) web editor, which means that you can create your web…
This article is very specific and is only intended to help if you are installing Dreamweaver 8 in a Windows 7 environment with Office 2007 installed.   I'm not sure why Microsoft tends to release OS' that should not be released but they do.  Windows…
Screencast - Getting to Know the Pipeline
With just a little bit of  SQL and VBA, many doors open to cool things like synchronize a list box to display data relevant to other information on a form.  If you have never written code or looked at an SQL statement before, no problem! ...  give i…

830 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