Jump to content

wont make it turn red wtf?


Monkuar

Recommended Posts

else if ($cur_topic['icon_topic'] == '2')
        {
            $icon_topic = '<font color=red>';
            $subject = '<font color="red">' . $subject . '</font>';
        }

 

and it just wont make it turn bold on my topic title

 

am i doing something wrong?

 

2 is value of a input type text box of a using checking if they want there topic title red..

 

 

I can use <b> and <i> and it works just not font color weird eH?

 

Link to comment
Share on other sites

  • Replies 51
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

The <font> tag was depreciated as of HTML4 and XHTML. Might not be causing the problem, but you shouldn't be using <font> anyway. Use <span style="color:red"></span> instead.

 

i tryed. still not working omg

 

i even put <span style="color:red">hey</span> next to the $subject and it worked but whenever i put it inisdd $subject it doesnt work lol then i view source on my page and it shows it perfect wtf man

Link to comment
Share on other sites

Not working? What could that mean? That your monitor is broken and can no longer display the color red?

 

Seriously, "not working" doesn't help us at all. Is the HTML output (check the source)?

 

Maybe he should reformat his hard drive. It could fix it if it's just a monitor issue.  ;)

Link to comment
Share on other sites

Not working? What could that mean? That your monitor is broken and can no longer display the color red?

 

Seriously, "not working" doesn't help us at all. Is the HTML output (check the source)?

 

Maybe he should reformat his hard drive. It could fix it if it's just a monitor issue.  ;)

 

Get off his sack please, k thanks.

 

And no it when i view page source, it shows it just perfect fine right between the tags, do u know what problem could be with my $subject variable? i'll post my whole function below:

 

if ($cur_topic['moved_to'] == null)

		$last_post = '<a href="viewtopic.php?pid='.$cur_topic['last_post_id'].'#p'.$cur_topic['last_post_id'].'">'.format_time($cur_topic['last_post']).'</a><br />'.$lang_common['by'].' <a href="profile.php?id='.$cur_topic['last_poster_id'].'">'.pun_htmlspecialchars($cur_topic['last_poster']).''.$desktop.'</a></span>';
else
		$last_post = ' ';
	if ($pun_config['o_censoring'] == '1')
		$cur_topic['subject'] = censor_words($cur_topic['subject']);

	if ($cur_topic['moved_to'] != 0)

		$subject = $lang_forum['Moved'].': <a href="viewtopic.php?id='.$cur_topic['moved_to'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> '.$lang_common['by'].' '.pun_htmlspecialchars($cur_topic['poster']).'</span>';
	else if ($cur_topic['closed'] == '0')
		$subject = '<a href="viewtopic.php?id='.$cur_topic['id'].'">'.pun_htmlspecialchars($cur_topic['subject']).'</a> '.'';
	//monk@
	else
	{
		$subject = '<font color=red>Closed: <a href="viewtopic.php?id='.$cur_topic['id'].'">'.$cur_topic['subject'].'</a></font>'.'';
		$icon_text = '<tr class="cl bc1"> 
';
	}

	if (!$pun_user['is_guest'] && $cur_topic['last_post'] > $pun_user['last_visit'] && $cur_topic['moved_to'] == null)
	{

		$item_status .= ' inew';
		$icon_type = 'e1';
		$subject = $subject;
		$subject_new_posts = '[ <a href="viewtopic.php?id='.$cur_topic['id'].'&action=new"><b>New Posts</b></a> ]';
	}
	else
		$subject_new_posts = null;

	// Should we display the dot or not? 
	if (!$pun_user['is_guest'] && $pun_config['o_show_dot'] == '1')
	{
		if ($cur_topic['has_posted'] == $pun_user['id'])
			$subject = '<strong>·</strong> '.$subject;
		else
			$subject = '  '.$subject;
	}

	if ($cur_topic['sticky'] == '1')
	{
		$subject = '<b>'.'Pinned'.':</b> '.$subject;


	}

	if ($cur_topic['icon_topic'] == '1')
        {
            $icon_topic = 'I chose value =1';
            $subject = $icon_topic.' '.$subject;
        }
	else if ($cur_topic['icon_topic'] == '2')
        {
            
            $subject = "<span style=\"color:red;\">2 $subject</span>";
        }

 

Thanks! $subject i cant find, were the problem is, see the word 2.. it shows red, but the subject doesn't here's a screenshot bro..: (it's at bottom of code)

 

 

b5653t.jpg

 

thank u sir!

Link to comment
Share on other sites

You likely have CSS elsewhere that is overriding it. Use Firebug to debug it. Using Firebug you can inspect an element to see which CSS selectors and which attributes that are applied to that element, and overstruck attributes mean they've been overridden.

Link to comment
Share on other sites

You likely have CSS elsewhere that is overriding it. Use Firebug to debug it.

not true, i removed all css on the site, and took a screenshot, look..

 

346npr9.jpg

 

yes i use firebug and i do inspect element nothing shows, that's why i post here for your help..

Link to comment
Share on other sites

Any chance you could provide a link then?

he meansa link to my site.. ROFL

 

dood it's on localhost, -.-

 

OMG :(

 

hmm...

 

what else should i try bro ?

 

should i add a header that defines my page as a html strict or something?

Link to comment
Share on other sites

Where r the quotes in font? Dnt u think it should be like <font color="red">omg wtf</font>

 

HAha bro i tryed the font color="red" and stuff it doesn't help.. at all, thanks tho.. man im so nervous i really need this to work. omgggggggg

 

O_O On my s/s it shows it's purple text? maybe that has something to do with it? isn't that just a.class link ? ? -.-

Link to comment
Share on other sites

Yep, I know monkuar, I was referring to the link on your website.

 

@the localhost problem: either PM Daniel0 with your server's IP address, or put the page on some free hosting site.

 

Oh, and, I'm right.  ;) (jk, I'm only perfect)

Link to comment
Share on other sites

should i add a header that defines my page as a html strict or something?

 

You should have a strict DOCTYPE regardless.

 

 

As for your problem, instead of using inline styles, define a class and then style it and the links within it.

 

 

If you just try this:

<span style="color:red">foo <a href="http://phpfreaks.com">test</a></span>

you'll see that it will not result in a red link either. That's just not how things work.

Link to comment
Share on other sites

Make a css class and try then. Wtf

 

Ok i'll try that right now..

 

BRB..

 

33xttsj.jpg

 

 

 

 

21l263m.jpg

 

 

 

rkmue1.jpg

 

 

WOW FAIL WTF? IM GOING CRAZY.. LOL!!

 

EDIT: Why move to css help this is php help.. it's something to do with $subject variable.. i posted the code for u.. :D

Link to comment
Share on other sites

Try this:

 

a.red:link

{

color:#ff0000;

}

 

Then: echo '<span class="red">' . $subject . '</span>';

 

 

sorry sir, that doesn't work, thanks tho .. :(

 

omg man i am so lost in this world

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.