Trouble with Absolute Positioning

  • The Apostle of God
  • Beginner
  • Beginner
  • User avatar
  • Posts: 54
  • Loc: SDSU, SD, USA

Post 3+ Months Ago

I am wanting to absolute position an ad which is generated by phpadnews, but I am having a problem and well, I can't figure out why :? Here is a link to the page I am doing all of this on (It is a custom template for vbb): http://theapostleofgod.com/forums/index ... &styleid=8
Code: [ Select ]
<table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
<tr valign="bottom">
    <td align="$stylevar[left]">
    <a href="$vboptions[forumhome].php?$session[sessionurl]"><img               
src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a>
<!-- testing phpad--!>
<div id="banner">
<script language='JavaScript' type='text/javascript'>
<!--
  if (!document.phpAds_used) document.phpAds_used = ',';
  phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
 
  document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
  document.write ("http://www.******.com/phpAdsNew/adjs.php?n=" + phpAds_random);
  document.write ("&exclude=" + document.phpAds_used);
  if (document.referer)
   document.write ("&referer=" + escape(document.referer));
  document.write ("'><" + "/script>");
//-->
</script> <noscript>

<a href='http://www.*****.com/phpAdsNew/adclick.php?n=ae606c05' target='_blank'><img src='http://www.rx8web.com/phpAdsNew/adview.php?n=ae606c05' border='0' alt=''></a></noscript></div>
<!-- end test !-->
</td>
    
</tr>

</table>
  1. <table border="0" width="$stylevar[outertablewidth]" cellpadding="0" cellspacing="0" align="center">
  2. <tr valign="bottom">
  3.     <td align="$stylevar[left]">
  4.     <a href="$vboptions[forumhome].php?$session[sessionurl]"><img               
  5. src="$stylevar[titleimage]" border="0" alt="$vboptions[bbtitle]" /></a>
  6. <!-- testing phpad--!>
  7. <div id="banner">
  8. <script language='JavaScript' type='text/javascript'>
  9. <!--
  10.   if (!document.phpAds_used) document.phpAds_used = ',';
  11.   phpAds_random = new String (Math.random()); phpAds_random = phpAds_random.substring(2,11);
  12.  
  13.   document.write ("<" + "script language='JavaScript' type='text/javascript' src='");
  14.   document.write ("http://www.******.com/phpAdsNew/adjs.php?n=" + phpAds_random);
  15.   document.write ("&exclude=" + document.phpAds_used);
  16.   if (document.referer)
  17.    document.write ("&referer=" + escape(document.referer));
  18.   document.write ("'><" + "/script>");
  19. //-->
  20. </script> <noscript>
  21. <a href='http://www.*****.com/phpAdsNew/adclick.php?n=ae606c05' target='_blank'><img src='http://www.rx8web.com/phpAdsNew/adview.php?n=ae606c05' border='0' alt=''></a></noscript></div>
  22. <!-- end test !-->
  23. </td>
  24.     
  25. </tr>
  26. </table>


As you can see, I am trying to use a div called "banner" to position the graphic phpadnews refers. Here is the relevant style definition:
Code: [ Select ]
.banner
    {
    border:none;
    position:absolute;
    top:300px;
    left:50px;
    width:468px;
    height:100%;
    background-color: ;
    padding:0px
    }
  1. .banner
  2.     {
  3.     border:none;
  4.     position:absolute;
  5.     top:300px;
  6.     left:50px;
  7.     width:468px;
  8.     height:100%;
  9.     background-color: ;
  10.     padding:0px
  11.     }


No matter what values I put into the top or left positions, nothing changes; It is always smack dab underneath the title banner. Now, I will be moving several graphics around up there eventually, and need to figure out the basic premise obviously. Any help is much appreciated!
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • ATNO/TW
  • Super Moderator
  • Super Moderator
  • User avatar
  • Posts: 23456
  • Loc: Woodbridge VA

Post 3+ Months Ago

I've always had probs with absolute positioning. If I absolute postion something it may look OK at 1024x768, but if I switch to a different re and view it it's off. Ive never found a solution for that since it's based on pixel count. I would love for someone to show me how to make tis work in all resolutionsl.

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 52 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.