verano Posted September 7, 2008 Share Posted September 7, 2008 how can i center the adbrite ad that i have on my page? anditslove.com thanks! Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/ Share on other sites More sharing options...
cooldude832 Posted September 7, 2008 Share Posted September 7, 2008 php has no native control for page styling of xhtml documents and their objects. To do this you need to apply css or xhtml parameters to the element/oject Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635539 Share on other sites More sharing options...
dezkit Posted September 7, 2008 Share Posted September 7, 2008 ? Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635540 Share on other sites More sharing options...
verano Posted September 7, 2008 Author Share Posted September 7, 2008 <script type="text/javascript"> /* <![CDATA[ */ var loadingTag = "{lang mkey='loading'}"; var modeRewrite = "{$config.enable_mod_rewrite}"; var docRoot = "{$smarty.const.DOC_ROOT}"; var alphanumeric_chars = "{lang mkey='alphanumeric'}"; var alphanum_chars = "{lang mkey='alphanum'}"; var text_chars = "{lang mkey='text'}"; var full_chars = "{lang mkey='full_chars'}"; {if $config.use_popups == 'N'} var use_popups = false; {else} var use_popups = true; {/if} <!-- Begin: AdBrite --> <script type="text/javascript"> var AdBrite_Title_Color = '0000FF'; var AdBrite_Text_Color = '000000'; var AdBrite_Background_Color = 'FFFFFF'; var AdBrite_Border_Color = 'CCCCCC'; var AdBrite_URL_Color = '008000'; </script> <span style="white-space:nowrap;"><script src="http://ads.adbrite.com/mb/text_group.php?sid=" type="text/javascript"></script><!-- --><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid="><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span> <!-- End: AdBrite --> How do i center this??? Thanks! Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635544 Share on other sites More sharing options...
cooldude832 Posted September 7, 2008 Share Posted September 7, 2008 I can't see any php in there to help wit sorry Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635545 Share on other sites More sharing options...
verano Posted September 7, 2008 Author Share Posted September 7, 2008 yoru right, i was hoping you guys could help Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635546 Share on other sites More sharing options...
cooldude832 Posted September 7, 2008 Share Posted September 7, 2008 yoru right, i was hoping you guys could help If posted in the right section help would e offered Also the fact that basic xhtml/css should be known before venturing into php makes use reluctant to help Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635548 Share on other sites More sharing options...
nuttycoder Posted September 7, 2008 Share Posted September 7, 2008 by the looks of it all your code is bunched together so the html comments are commenting out <center> <script type="text/javascript">/* <![CDATA[ */var loadingTag = "Loading..";var modeRewrite = "N";var docRoot = "/";var alphanumeric_chars = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ()_";var alphanum_chars = "0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var text_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz /'";var full_chars = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz() _$+=;:?'";var use_popups = true; <!-- Begin: AdBrite --><center><script type="text/javascript">var AdBrite_Title_Color = '0000FF';var AdBrite_Text_Color = '000000';var AdBrite_Background_Color = 'FFFFFF';var AdBrite_Border_Color = 'CCCCCC';var AdBrite_URL_Color = '008000';</script><span style="white-space:nowrap;"><script src="http://ads.adbrite.com/mb/text_group.php?sid=738701&zs=3732385f3930" type="text/javascript"></script><!----><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=738701&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span></center><!-- End: AdBrite --> try spacing it out like this <script type="text/javascript"> /* <![CDATA[ */ var loadingTag = "Loading.."; var modeRewrite = "N"; var docRoot = "/"; var alphanumeric_chars = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ()_"; var alphanum_chars = "0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; var text_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz /'"; var full_chars = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz() _$+=;:?'"; var use_popups = true; <!-- Begin: AdBrite --> <center><script type="text/javascript"> var AdBrite_Title_Color = '0000FF'; var AdBrite_Text_Color = '000000'; var AdBrite_Background_Color = 'FFFFFF'; var AdBrite_Border_Color = 'CCCCCC'; var AdBrite_URL_Color = '008000'; </script><span style="white-space:nowrap;"> <script src="http://ads.adbrite.com/mb/text_group.php?sid=738701&zs=3732385f3930" type="text/javascript"></script> <!----> <a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=738701&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span> </center> <!-- End: AdBrite --> Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635549 Share on other sites More sharing options...
verano Posted September 7, 2008 Author Share Posted September 7, 2008 by the looks of it all your code is bunched together so the html comments are commenting out <center> <script type="text/javascript">/* <![CDATA[ */var loadingTag = "Loading..";var modeRewrite = "N";var docRoot = "/";var alphanumeric_chars = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ()_";var alphanum_chars = "0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";var text_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz /'";var full_chars = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz() _$+=;:?'";var use_popups = true; <!-- Begin: AdBrite --><center><script type="text/javascript">var AdBrite_Title_Color = '0000FF';var AdBrite_Text_Color = '000000';var AdBrite_Background_Color = 'FFFFFF';var AdBrite_Border_Color = 'CCCCCC';var AdBrite_URL_Color = '008000';</script><span style="white-space:nowrap;"><script src="http://ads.adbrite.com/mb/text_group.php?sid=738701&zs=3732385f3930" type="text/javascript"></script><!----><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=738701&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span></center><!-- End: AdBrite --> try spacing it out like this <script type="text/javascript"> /* <![CDATA[ */ var loadingTag = "Loading.."; var modeRewrite = "N"; var docRoot = "/"; var alphanumeric_chars = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz ()_"; var alphanum_chars = "0123456789_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz"; var text_chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz /'"; var full_chars = "0123456789.+-_#,/ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz() _$+=;:?'"; var use_popups = true; <!-- Begin: AdBrite --> <center><script type="text/javascript"> var AdBrite_Title_Color = '0000FF'; var AdBrite_Text_Color = '000000'; var AdBrite_Background_Color = 'FFFFFF'; var AdBrite_Border_Color = 'CCCCCC'; var AdBrite_URL_Color = '008000'; </script><span style="white-space:nowrap;"> <script src="http://ads.adbrite.com/mb/text_group.php?sid=738701&zs=3732385f3930" type="text/javascript"></script> <!----> <a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=738701&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span> </center> <!-- End: AdBrite --> no luck Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635552 Share on other sites More sharing options...
nuttycoder Posted September 7, 2008 Share Posted September 7, 2008 just been back to your site and it hasn't changed neither has the source code to the <code> if still being commented out. Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635553 Share on other sites More sharing options...
verano Posted September 7, 2008 Author Share Posted September 7, 2008 whats the plan now, any ideas? Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635554 Share on other sites More sharing options...
nuttycoder Posted September 7, 2008 Share Posted September 7, 2008 alter the html so it is not all on one line as in my previous example am sure that will fix it. Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635555 Share on other sites More sharing options...
DarkWater Posted September 7, 2008 Share Posted September 7, 2008 @nuttycoder: HTML comment have ending delimiters, they aren't "end of line" comments. @verano: Add this CSS style to it: #adbrite { margin: 0 auto 0 auto; } You might have to play around with the top and bottom margins so it doesn't like, collapse. Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635558 Share on other sites More sharing options...
nuttycoder Posted September 7, 2008 Share Posted September 7, 2008 there's different style's of comments <!-- single line comment --> /* multi line comment */ looking at the source code and even if I paste everything into Dreamweaver parts are commented out. Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635561 Share on other sites More sharing options...
verano Posted September 7, 2008 Author Share Posted September 7, 2008 @nuttycoder: HTML comment have ending delimiters, they aren't "end of line" comments. @verano: Add this CSS style to it: #adbrite { margin: 0 auto 0 auto; } You might have to play around with the top and bottom margins so it doesn't like, collapse. where at in the code? sorry Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635563 Share on other sites More sharing options...
DarkWater Posted September 7, 2008 Share Posted September 7, 2008 In <style> tags in the <head> tags or in an external style sheet. Then, you need to drop a DIV around the adbrite ads and give it the id "adbrite", like this: <div id="adbrite"> <!--Adbrite Stuff Here --> </div> Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635567 Share on other sites More sharing options...
verano Posted September 7, 2008 Author Share Posted September 7, 2008 ok so the external file is callled default css in which i will put the coding for the CSS that you previously provided, now as far as the code to put the other page how do i do that? somethign liek this? <div id="adbrite"> <!--Adbrite Stuff Here --> <script type="text/javascript"> /* <![CDATA[ */ var loadingTag = "{lang mkey='loading'}"; var modeRewrite = "{$config.enable_mod_rewrite}"; var docRoot = "{$smarty.const.DOC_ROOT}"; var alphanumeric_chars = "{lang mkey='alphanumeric'}"; var alphanum_chars = "{lang mkey='alphanum'}"; var text_chars = "{lang mkey='text'}"; var full_chars = "{lang mkey='full_chars'}"; {if $config.use_popups == 'N'} var use_popups = false; {else} var use_popups = true; {/if} <!-- Begin: AdBrite --> <script type="text/javascript"> var AdBrite_Title_Color = '0000FF'; var AdBrite_Text_Color = '000000'; var AdBrite_Background_Color = 'FFFFFF'; var AdBrite_Border_Color = 'CCCCCC'; var AdBrite_URL_Color = '008000'; </script> <span style="white-space:nowrap;"><script src="http://ads.adbrite.com/mb/text_group.php?sid=738701&zs=3732385f3930" type="text/javascript"></script><!-- --><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=738701&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span> <!-- End: AdBrite --> </div> Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635571 Share on other sites More sharing options...
DarkWater Posted September 7, 2008 Share Posted September 7, 2008 Yeah, but did you actually link to the stylesheet? Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635578 Share on other sites More sharing options...
verano Posted September 7, 2008 Author Share Posted September 7, 2008 ok so that centered the text , if you take a look at the site, but not the actual banner Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635580 Share on other sites More sharing options...
verano Posted September 7, 2008 Author Share Posted September 7, 2008 what do u mean by link Yeah, but did you actually link to the stylesheet? Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635604 Share on other sites More sharing options...
DarkWater Posted September 7, 2008 Share Posted September 7, 2008 what do u mean by link Yeah, but did you actually link to the stylesheet? <link rel="stylesheet" type="text/css" href="default.css" /> Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635606 Share on other sites More sharing options...
nuttycoder Posted September 7, 2008 Share Posted September 7, 2008 for the stylesheet to be associated with yout html page the page needs to know where to find it you give the path via a link like <link href="default.css" rel="stylesheet" type="text/css" /> if your stylesheet is in the root of your site this will work otherwise include the path to the stylesheet like <link href="path to stylesheet default.css" rel="stylesheet" type="text/css" /> e.g <link href="style/default.css" rel="stylesheet" type="text/css" /> ** EDIT ** Beat me to it lol Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635607 Share on other sites More sharing options...
verano Posted September 7, 2008 Author Share Posted September 7, 2008 <!-- Begin: AdBrite --> <script type="text/javascript"> var AdBrite_Title_Color = '0000FF'; var AdBrite_Text_Color = '000000'; var AdBrite_Background_Color = 'FFFFFF'; var AdBrite_Border_Color = 'CCCCCC'; var AdBrite_URL_Color = '008000'; </script> <span style="white-space:nowrap;"><script src="http://ads.adbrite.com/mb/text_group.php?sid=738701&zs=3732385f3930" type="text/javascript"></script><!-- --><a target="_top" href="http://www.adbrite.com/mb/commerce/purchase_form.php?opid=738701&afsid=1"><img src="http://files.adbrite.com/mb/images/adbrite-your-ad-here-leaderboard.gif" style="background-color:#CCCCCC;border:none;padding:0;margin:0;" alt="Your Ad Here" width="14" height="90" border="0" /></a></span> <!-- End: AdBrite --> </div> <script type="text/javascript"> var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www."); document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E")); </script> <script type="text/javascript"> var pageTracker = _gat._getTracker("UA-2548612-6"); pageTracker._initData(); pageTracker._trackPageview(); </script> {if $config.use_profilepopups == 'N'} var use_profilepopups = false; {else} var use_profilepopups = true; {/if} /* ]]> */ </script> <link href="{$css_path}default.css" rel="stylesheet" type="text/css" /> still nothing Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635608 Share on other sites More sharing options...
nuttycoder Posted September 7, 2008 Share Posted September 7, 2008 your calling a var inside html needs to be inside php yours: <link href="{$css_path}default.css" rel="stylesheet" type="text/css" /> use <link href="<?php echo $css_path;?>default.css" rel="stylesheet" type="text/css" /> Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635610 Share on other sites More sharing options...
verano Posted September 7, 2008 Author Share Posted September 7, 2008 it just posts a messed up page... Link to comment https://forums.phpfreaks.com/topic/123072-simple-php-issue/#findComment-635611 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.