squiblo Posted July 28, 2009 Share Posted July 28, 2009 in my else if statement, everything working apart from the css part in the else if statment and is not showing on the page, there is nothing wrong with the css itself as i have tested it on its own. how can i fix this? Quote Link to comment https://forums.phpfreaks.com/topic/167747-solved-showing-css/ Share on other sites More sharing options...
squiblo Posted July 28, 2009 Author Share Posted July 28, 2009 <?php session_start(); if($_SESSION['myusername']){ ?> <div id="wb_Text1" style="position:absolute;left:684px;top:55px;width:151px;height:14px;z-index:7" align="right"> <font style="font-size:13px" color="#FFFFFF" face="Arial">You are logged in as:</font><br> <font style="font-size:15px" color="#FF0000" face="Arial"> <?php echo ucwords(strtolower($_SESSION['myusername'])); ?> </font></div> <div id="logout" style="position:absolute;left:775px;top:130px;width:64px;height:23px;z-index:12" align="center"><a href="/logout.php"> <?php echo '<img src="/Images/logout.png" id="logout" align="top" alt="logout" title="" border="0" width="64" height="23">'; ?> </a></div> <div id="apps" style="position:absolute;left:754px;top:169px;z-index:14" align="center"> <?php 'ul.cssMenu ul{display:none} ul.cssMenu li:hover>ul{display:block} ul.cssMenu ul{position: absolute;left:-1px;top:98%;} ul.cssMenu ul ul{position: absolute;left:98%;top:-2px;} ul.cssMenu,ul.cssMenu ul { margin:0px; list-style:none; padding:0px 2px 2px 0px; background-color:#ffffff; background-repeat:repeat; border-color:#AAAAAA; border-width:1px; border-style:solid; } ul.cssMenu table {border-collapse:collapse}ul.cssMenu { display:block; zoom:1; float: left; } ul.cssMenu ul{ width:64.05px; } ul.cssMenu li{ display:block; margin:2px 0px 0px 2px; font-size:0px; } ul.cssMenu a:active, ul.cssMenu a:focus { outline-style:none; } ul.cssMenu a, ul.cssMenu li.dis a:hover, ul.cssMenu li.sep a:hover { display:block; vertical-align:middle; background-color:#ffffff; border-width:0px; border-color:#6655ff; border-style:solid; text-align:left; text-decoration:none; padding:4px; _padding-left:0; font:normal 11px Verdana; color: #444444; text-decoration:none; cursor:default; } ul.cssMenu span{ overflow:hidden; } ul.cssMenu li { float:left; } ul.cssMenu ul li { float:none; } ul.cssMenu ul a { text-align:left; white-space:nowrap; } ul.cssMenu li.sep{ text-align:center; padding:0px; line-height:0; height:100%; } ul.cssMenu li.sep span{ float:none; padding-right:0; width:5; height:16; display:inline-block; background-color:#AAAAAA; background-image:none;} ul.cssMenu ul li.sep span{ width:80%; height:3; } ul.cssMenu li:hover{ position:relative; } ul.cssMenu li:hover>a{ background-color:#4792E6; border-color:#665500; border-style:solid; font:normal 11px Verdana; color: #ffffff; text-decoration:none; } ul.cssMenu li a:hover{ position:relative; background-color:#4792E6; border-color:#665500; border-style:solid; font:normal 11px Verdana; color: #ffffff; text-decoration:none; } ul.cssMenu li.dis a { color: #AAAAAA !important; } ul.cssMenu img {border: none;float:left;_float:none;margin-right:4px;width:16px; height:16px; } ul.cssMenu ul img {width:16px; height:16px; } ul.cssMenu img.over{display:none} ul.cssMenu li.dis a:hover img.over{display:none !important} ul.cssMenu li.dis a:hover img.def {display:inline !important} ul.cssMenu li:hover > a img.def {display:none} ul.cssMenu li:hover > a img.over {display:inline} ul.cssMenu a:hover img.over,ul.cssMenu a:hover ul img.def,ul.cssMenu a:hover a:hover img.over{display:inline} ul.cssMenu a:hover img.def,ul.cssMenu a:hover ul img.over,ul.cssMenu a:hover a:hover img.def{display:none} ul.cssMenu a:hover ul{display:block} ul.cssMenu span{ display:block; background-image:url(http://squiblo.com/Images/arrv_anim_1.gif); background-position:right center; background-repeat: no-repeat; padding-right:11px;} ul.cssMenu li:hover>a>span{ background-image:url(http://squiblo.com/Images/arrv_anim_1o.gif); } ul.cssMenu a:hover span{ _background-image:url(http://squiblo.com/Images/arrv_anim_1o.gif)} ul.cssMenu ul span,ul.cssMenu a:hover table span{background-image:url(http://squiblo.com/Images/arr_double_1.gif)} ul.cssMenu ul li:hover > a span{ background-image:url(http://squiblo.com/Images/arrv_anim_1o.gif);} ul.cssMenu table a:hover span{background-image:url(http://squiblo.com/Images/arrv_anim_1o.gif)} </style> <ul class="cssMenu cssMenum"> <li class=" cssMenui"><a class=" cssMenui" href="#"><span>Accessories</span><![if gt IE 6]></a><![endif]><!--[if lte IE 6]><table><tr><td><![endif]--> <ul class=" cssMenum"> <li class=" cssMenui"><a class=" cssMenui" href="http://google.com">Music</a></li> <li class=" cssMenui"><a class=" cssMenui" href="http://google.com">Chat</a></li> <li class=" cssMenui"><a class=" cssMenui" href="/games.php">Games</a></li> <li class=" cssMenui"><a class=" cssMenui" href="http://google.com">Radio</a></li> <li class=" cssMenui"><a class=" cssMenui" href="/accessories.php">Other</a></li> </ul> <!--[if lte IE 6]></td></tr></table></a><![endif]--></li> </ul>' ?> </div> <?php } else { ?> <form name="form1" method="post" action="checklogin.php"> <input type="text" id="myusername" style="position:absolute;left:651px;top:59px;width:174px;font-family:Arial;font-size:13px;z-index:4" size="29" name="myusername" value="" title="username"> <input type="password" id="mypassword" style="position:absolute;left:651px;top:86px;width:174px;font-family:Arial;font-size:13px;z-index:5" size="29" name="mypassword" value="" tabindex="password" title="password"> <input type="checkbox" id="Checkbox1" name="Checkbox1" value="on" style="position:absolute;left:648px;top:113px;font-family:Arial;font-size:13px;z-index:6"> <input type="submit" id="Button1" name="Login" value="Login" style="position:absolute;left:778px;top:117px;width:50px;height:43px;font-family:Arial;font-size:13px;z-index:8" title="Login"> </form> <div id="wb_Text7" style="position:absolute;left:584px;top:63px;width:47px;height:16px;z-index:22" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Username:</font></div> <div id="wb_Text8" style="position:absolute;left:586px;top:88px;width:65px;height:16px;z-index:23" align="left"> <font style="font-size:13px" color="#FFFFFF" face="Arial">Password:</font></div> <div id="wb_Text2" style="position:absolute;left:669px;top:113px;width:111px;height:14px;z-index:7" align="left"> <font style="font-size:11px" color="#FFFFFF" face="Arial">Remember Me</font></div> <div id="wb_Text3" style="position:absolute;left:651px;top:131px;width:122px;height:14px;z-index:9" align="left"> <font style="font-size:11px" color="#FFFFFF" face="Arial">Forgot your password?</font></div> <?php } ?> Quote Link to comment https://forums.phpfreaks.com/topic/167747-solved-showing-css/#findComment-884584 Share on other sites More sharing options...
vineld Posted July 28, 2009 Share Posted July 28, 2009 That's because you never print the css. Look at where your php tag begings, right after <?php. Quote Link to comment https://forums.phpfreaks.com/topic/167747-solved-showing-css/#findComment-884586 Share on other sites More sharing options...
squiblo Posted July 28, 2009 Author Share Posted July 28, 2009 what do u mean? Quote Link to comment https://forums.phpfreaks.com/topic/167747-solved-showing-css/#findComment-884588 Share on other sites More sharing options...
mmarif4u Posted July 28, 2009 Share Posted July 28, 2009 He mean echo your css. Quote Link to comment https://forums.phpfreaks.com/topic/167747-solved-showing-css/#findComment-884592 Share on other sites More sharing options...
squiblo Posted July 28, 2009 Author Share Posted July 28, 2009 when i echo it, it basically echoes all of the code Quote Link to comment https://forums.phpfreaks.com/topic/167747-solved-showing-css/#findComment-884593 Share on other sites More sharing options...
mmarif4u Posted July 28, 2009 Share Posted July 28, 2009 An idea for you, why not put the css code in separate file and then include it in this page. Like: <head> <link rel="stylesheet" type="text/css" href="test.css" /> </head> Quote Link to comment https://forums.phpfreaks.com/topic/167747-solved-showing-css/#findComment-884595 Share on other sites More sharing options...
squiblo Posted July 28, 2009 Author Share Posted July 28, 2009 if i do that how am i able to move it to where i wont on the page because its a drop down menu Quote Link to comment https://forums.phpfreaks.com/topic/167747-solved-showing-css/#findComment-884596 Share on other sites More sharing options...
vineld Posted July 28, 2009 Share Posted July 28, 2009 Unless your css is inline you do not need to place it where the action is so to speak. Use the suggested example and link to an external css file within <head></head>. It will then apply to your entire html document and make your life easier. Maybe you should read a little about the basic structure of websites. Quote Link to comment https://forums.phpfreaks.com/topic/167747-solved-showing-css/#findComment-884601 Share on other sites More sharing options...
mmarif4u Posted July 28, 2009 Share Posted July 28, 2009 Unless your css is inline you do not need to place it where the action is so to speak. Use the suggested example and link to an external css file within <head></head>. It will then apply to your entire html document and make your life easier. Maybe you should read a little about the basic structure of websites. Yup...agree...You should read the basics and understand it b4 implementing it. Quote Link to comment https://forums.phpfreaks.com/topic/167747-solved-showing-css/#findComment-884603 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.