It is currently Tue Mar 19, 2024 2:50 am


All times are UTC


Forum rules


Please click here to view the forum rules



Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Odd PHP and CSS problem
PostPosted: Sun Jun 04, 2006 10:52 pm 
Experienced
Experienced

Joined: Sun Feb 20, 2005 3:11 pm
Posts: 92
Location: Australia
Hello.

I've got my H1 tag defined in my stylesheet. For some reason my PHP pages are ouputting the H1 tag like this:
Code:
<h1><font>Blah</font></h1>

Instead of this:
Code:
<h1>Blah</h1>

Any ideas what might be causing that?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jun 04, 2006 10:58 pm 
Experienced
Experienced

Joined: Sun Feb 20, 2005 3:11 pm
Posts: 92
Location: Australia
The code involved:
Code:
echo '<center><h1>Blah</h1></center>';

Code:
h1{
size: x-large;
color: #fffff0;
weight: bold;
background-color: #d17c80;
}


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 05, 2006 1:05 am 
I have no life!
I have no life!

Joined: Sun Feb 13, 2005 6:12 pm
Posts: 1504
Location: My Office
Greetings,

Now my question is, does your HTML code in your 'echo' statement look like the one you would like it to be?

_________________
Best Regards:
Aaron McGowan (aka: CyberGeek, =cipher=)

CyberGeek's Software Solutions
-- WWW: http://www.cybergeeksoftware.com
-- Tech Line: 1-519-860-4557
-- Email: cybergeek@cybergeeksoftware.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 05, 2006 1:29 am 
Experienced
Experienced

Joined: Sun Feb 20, 2005 3:11 pm
Posts: 92
Location: Australia
Nope. The PHP is this:
Code:
echo '<center><h1>Blah</h1></center>';

The HTML output is this:
Code:
<center><h1><font>Blah</font></h1></center>

I have no idea how it is inserting the extra tags. And somehow the FONT tag is overriding the H1 tag properties.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 05, 2006 2:58 am 
I have no life!
I have no life!

Joined: Sun Feb 13, 2005 6:12 pm
Posts: 1504
Location: My Office
Greetings,

Sorry, I miss understood your original question. Are you sure you have not added the <font></font> tags?

_________________
Best Regards:
Aaron McGowan (aka: CyberGeek, =cipher=)

CyberGeek's Software Solutions
-- WWW: http://www.cybergeeksoftware.com
-- Tech Line: 1-519-860-4557
-- Email: cybergeek@cybergeeksoftware.com


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 05, 2006 1:03 pm 
Experienced
Experienced

Joined: Sun Feb 20, 2005 3:11 pm
Posts: 92
Location: Australia
Absolutely. I've checked and checked again. I'm wondering if your PHP there is inserting them around echoed strings, or if I've accidentally somehow included something in my script which is doing that. Going by past experience, it's entirely probable that I've done something weird, but I thought I'd ask just in case.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 05, 2006 4:19 pm 
Experienced
Experienced

Joined: Sun Feb 20, 2005 3:11 pm
Posts: 92
Location: Australia
The CSS:
Code:
body{
margin-left: 5;
margin-right: 5;
margin-top: 5;
margin-bottom: 5;
background-color: #a4595c;
font-family: arial, "arial";
font-color: #d17c80;
}

font{
font-size: medium;
color: #d17c80;
style: normal;
variant: normal;
weight: normal;
}

font.form{
font-size: medium;
color: #d17c80;
style: normal;
variant: normal;
weight: normal;
}

h1{
size: x-large;
color: #fffff0;
font-color: #fffff0;
weight: bold;
background-color: #d17c80;
}

h2{
size: large;
color: #a4595c;
weight: bold;
background-color: #d17c80;
}

h3{
size: medium;
color: #a4595c;
weight: bold;
background-color: #d17c80;
}

hr{
width: 100%;
color: #fffff0;
}

p{
text-align: justify;
color: #d17c80;
font-size: medium;
}

a:link{
color: #fffff0;
font-size: small;
font-weight: bold;
text-decoration: underline;
}

a:visited{
color: #fffff0;
font-size: small;
font-weight: bold;
text-decoration: underline;
}

a:active{
color: #fffff0;
font-size: small;
font-weight: bold;
text-decoration: underline;
}

a:hover{
color: #aa0000;
background-color: #fffff0;
font-size: small;
font-weight: bold;
text-decoration: none;
}

a.menu:link{
color: #ee0000;
font-size: medium;
font-weight: bold;
text-decoration: underline;
}

a.menu:visited{
color: #ee0000;
font-size: medium;
font-weight: bold;
text-decoration: underline;
}

a.menu:active{
color: #ee0000;
font-size: medium;
font-weight: bold;
text-decoration: underline;
}

a.menu:hover{
color: #fffff0;
background-color: #ee0000;
font-size: medium;
font-weight: bold;
text-decoration: none;
}

table{
border-width: 1;
border-style: solid;
border-color: #fffff0;
spacing: 0;
padding: 0;
background-color: #aa0000;
}
tr{
vertical-align: top;
}
td{
vertical-align: top;
}

table.form{
border: 0;
spacing: 0;
padding: 0;
background-color: #aa0000;
}
tr.form{
vertical-align: top;
}
td.form{
vertical-align: top;
}

table.menu{
border-width: 1;
border-style: solid;
border-color: #fffff0;
spacing: 0;
padding: 0;
background-color: #aa0000;
}
tr.menu{
vertical-align: top;
}
td.menu{
vertical-align: top;
}

th{
color: #ee0000;
background-color: #aa0000;
}

.buttons{
color: #aa0000;
font-weight: bold;
background-color: #fffff0;
}

input:focus, textarea:focus{
background-color: #fffff0;
}

The file using it:
Code:
<?php

include("files/configuration.php");
include("files/top.php");

if($online == 1) // This variable set to 0 makes the site offline, 1 makes it online.
{
include("files/menu.php");
include("files/login.php");
}
else
{
echo '<center><h1>Coming soon!</h1></center>';
}

include("files/bottom.php");

?>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 05, 2006 4:20 pm 
Experienced
Experienced

Joined: Sun Feb 20, 2005 3:11 pm
Posts: 92
Location: Australia
The link: http://workshop.freefronthost.com/


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 05, 2006 4:55 pm 
Experienced
Experienced

Joined: Sun Feb 20, 2005 3:11 pm
Posts: 92
Location: Australia
Index.php: http://100ws.pastebin.com/760130

Top.php: http://100ws.pastebin.com/760132

Bottom.php: http://100ws.pastebin.com/760134

Configuration.php: http://100ws.pastebin.com/760138


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 05, 2006 5:44 pm 
Posts like crazy!
Posts like crazy!

Joined: Mon Sep 26, 2005 5:03 pm
Posts: 204
Location: The Netherlands
Quite obvious the top.php file...

Code:
<?php

include("files/configuration.php");

echo '<html>';
echo '<head>';
echo ' <title>'.SITE_TITLE.'</title>';
echo ' <link rel="stylesheet" type="text/css" href="'.SITE_CSS.'">';
echo '</head>';
echo '<body><font>';
?>


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jun 05, 2006 6:03 pm 
Experienced
Experienced

Joined: Sun Feb 20, 2005 3:11 pm
Posts: 92
Location: Australia
Revaroo wrote:
Quite obvious the top.php file...

Nope, I don't see how that top.php is managing to insert 'font' tags inside a string from index.php. What am I missing?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 09, 2006 6:36 am 
Experienced
Experienced

Joined: Sun Feb 20, 2005 3:11 pm
Posts: 92
Location: Australia
PsychoticDude85 wrote:
It isn't...

echo '<body><font>';

Should be:

echo '<body>';


I just wanted to also include the font tag there in case I output any regular font in the page without it being inside any other containers. But even if I remove that font tag, how are extra font tags being inserted into that output string?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Jun 09, 2006 9:36 am 
Experienced
Experienced

Joined: Sun Feb 20, 2005 3:11 pm
Posts: 92
Location: Australia
Yep, you were right, removing that font tag worked. Thanks very much.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ]  Moderators: fhmagic, KJ, Moderators, Support Team

All times are UTC


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

Search for:
Jump to:  
cron
100WebSpace © 2011