August 4, 201016 yr Hi All, Im trying to apply some CSS to an echo statement and it will not work. The echo is still printing, its just not applying the CSS, i have used the CSS on another HTML page so i know the CSS is correct. I'm not that good with PHP and because of this, its probably a simple mistake with a " or ' echo "<p class=\"whitetext\"><a href=\"menu.html\">View The Shoutbox</a></p>"; Thanks in advance
August 4, 201016 yr Your PHP is correct. Fancy posting the CSS? EDIT: If you want a hyperlink to appear as 'whitetext', you need to make a new CSS rule like: .whitetext a:link { } Assuming you haven't done that. That's the only thing I could see preventing it.
August 5, 201016 yr Author Hi Shaun, I have used the following CSS: .whitetext { color: #FFFFFF; } I have applied the CSS to an HTML link and it works fine, but when applied within PHP it won't Thanks
August 5, 201016 yr It shouldn't work in HTML, though. You're not defining the link style. See: http://www.ggth.net/testcss.php You just need to do what I said before: .whitetext a:link { color: #FFFFFF; }
August 5, 201016 yr Thanks, I'll give that a go when i get home from work, Thanks once again if no jot try this css .whitetext a { font-size:72px; color: #990000; } .whitetext a:hover { font-size:72px; color: #66CC66; } with <?php echo "<div class=\"whitetext\"><a href='menu.html'>View The Shoutbox</a></div>"; ?>
August 6, 201016 yr Author Hi pat24, I have only just seen your post, but i tried Shaun's suggestion last night and it worked fine. Thank you both for your input.
Create an account or sign in to comment