Daniel0 Posted July 19, 2009 Share Posted July 19, 2009 EDIT: Why move to css help this is php help.. it's something to do with $subject variable.. i posted the code for u.. Because it's a CSS issue, not a PHP issue. Just because you used PHP to output it doesn't mean it's where the problem is. Ok i'll try that right now.. You missed this part: [...] and then style it and the links within it. Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877885 Share on other sites More sharing options...
Monkuar Posted July 19, 2009 Author Share Posted July 19, 2009 You missed this part: [...] and then style it and the links within it. Maybe because i dont understand that? what does links within it mean? add a ahref in therE? and it could be a php problem because $subject could have a function called before it that replaces any txt lol like strpos or w/e Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877887 Share on other sites More sharing options...
Amtran Posted July 19, 2009 Share Posted July 19, 2009 WHOOPS! Do this: <script type="text/css"> a.red:link { color:#ff0000; } </script> <?php //All your PHP stuff... //Some more PHP stuff... echo '<a href="#" class="red">' . $subject . '</a>'; //Even more PHP stuff... Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877888 Share on other sites More sharing options...
Monkuar Posted July 19, 2009 Author Share Posted July 19, 2009 WAIT WAIT! ok i did what daniel said and he said to put a ahref so i did else if ($cur_topic['icon_topic'] == '2') { $subject = "<span class=\"lol123\"><a href='index.php'>hey</a> $subject</span>"; } and "Hey" shows up normal text like $subject.. omg so there's a hiding .css in my files somewhere that is changing ahref link color? OMGgggggggggggggg Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877890 Share on other sites More sharing options...
Daniel0 Posted July 19, 2009 Share Posted July 19, 2009 so there's a hiding .css in my files somewhere that is changing ahref link color? OMGgggggggggggggg Uh... yeah. It's built into every browser. Otherwise text that isn't explicitly styled by the web developer would be displayed all next to each other. I think what you should do is to learn about CSS. Amtran, class="red" is pointless. Classes should convey semantics, not presentation. What if you decide that all the links that have class="red" should later be blue? Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877891 Share on other sites More sharing options...
Monkuar Posted July 19, 2009 Author Share Posted July 19, 2009 so there's a hiding .css in my files somewhere that is changing ahref link color? OMGgggggggggggggg Uh... yeah. It's built into every browser. Otherwise text that isn't explicitly styled by the web developer would be displayed all next to each other. I think what you should do is to learn about CSS. no i mean is there a .css in my files that is a.red:link { color:#ff0000; } but says purple? bcz if so i need to find and delete it quick cause i cant have it u know.. Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877893 Share on other sites More sharing options...
Amtran Posted July 19, 2009 Share Posted July 19, 2009 Amtran, class="red" is pointless. Classes should convey semantics, not presentation. What if you decide that all the links that have class="red" should later be blue? Oh alright So class="supercoolawesomelink" is better? Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877894 Share on other sites More sharing options...
Amtran Posted July 19, 2009 Share Posted July 19, 2009 so there's a hiding .css in my files somewhere that is changing ahref link color? OMGgggggggggggggg Uh... yeah. It's built into every browser. Otherwise text that isn't explicitly styled by the web developer would be displayed all next to each other. I think what you should do is to learn about CSS. no i mean is there a .css in my files that is a.red:link { color:#ff0000; } but says purple? bcz if so i need to find and delete it quick cause i cant have it u know.. No, he means every browser will automatically set the text color and attributes if not specified by the website developer. Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877897 Share on other sites More sharing options...
Daniel0 Posted July 19, 2009 Share Posted July 19, 2009 Amtran, class="red" is pointless. Classes should convey semantics, not presentation. What if you decide that all the links that have class="red" should later be blue? Oh alright So class="supercoolawesomelink" is better? Yeah, or "closed", or "important" or whatever. Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877900 Share on other sites More sharing options...
Monkuar Posted July 19, 2009 Author Share Posted July 19, 2009 Sir.. any reason why my class is crossed out.. wow on the middle right Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877908 Share on other sites More sharing options...
Daniel0 Posted July 19, 2009 Share Posted July 19, 2009 Yeah, there is a reason. As I said, you should learn CSS. You need to apply rules to a selector called .se a otherwise the a will take precedence. Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877910 Share on other sites More sharing options...
Monkuar Posted July 19, 2009 Author Share Posted July 19, 2009 Yeah, there is a reason. As I said, you should learn CSS. You need to apply rules to a selector called .se a otherwise the a will take precedence. no.. that's bologny.. bcz on my site, 24-7gt.com.. on the forums i use <font color=red> and it works just fine i using same .css this is horseshit. something is wrong.. and ur telling me i need to learn css? pft... lol so it has nothing to do with freaking css Bro. i even removed MY WHOLE DAMN CSS And it didn't work.. Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877911 Share on other sites More sharing options...
Daniel0 Posted July 19, 2009 Share Posted July 19, 2009 Plain <font color="red">foo <a href="#">bar</a></font> will never result in a red link. Things aren't horseshit because you don't know how to use them. On the contrary, one could attach certain adjectives to you because you are using the things incorrectly, but I shall refrain from doing so. Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877914 Share on other sites More sharing options...
Monkuar Posted July 19, 2009 Author Share Posted July 19, 2009 Plain <font color="red">foo <a href="#">bar</a></font> will never result in a red link. Things aren't horseshit because you don't know how to use them. On the contrary, one could attach certain adjectives to you because you are using the things incorrectly, but I shall refrain from doing so. Ok i see u daniel.. if(strpos($topic['style'],'a') !== false) $topic['title_styled'] = "<font color=blue>{$topic[title_styled]}</font>"; why does that work on my 24-7gt.com then?? zz... Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877915 Share on other sites More sharing options...
Daniel0 Posted July 19, 2009 Share Posted July 19, 2009 Right, that's what I'm telling you. It will not result in a red link. You have to style the link yourself, hence the reason why you should learn CSS. I don't build bridges without knowing physics either. Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877917 Share on other sites More sharing options...
Monkuar Posted July 19, 2009 Author Share Posted July 19, 2009 Right, that's what I'm telling you. It will not result in a red link. You have to style the link yourself, hence the reason why you should learn CSS. I don't build bridges without knowing physics either. SEE? Look it's red.. rofl and im using this for that code: if(strpos($topic['style'],'c') !== false) $topic['title_styled'] = "<span style='color:red;'>{$topic[title_styled]}</span>"; see i told u im right save that screenshot to your desktop too so it's obliviously not a css issue..... Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877918 Share on other sites More sharing options...
Daniel0 Posted July 19, 2009 Share Posted July 19, 2009 Seriously... Can you tell me the difference between these two things? <span style="color:red"><a href="#">foo</a></span> <a href="#"><span style="color:red">foo</span></a> Maybe you should stop acting smug when you don't know what you're doing. Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877920 Share on other sites More sharing options...
Monkuar Posted July 19, 2009 Author Share Posted July 19, 2009 Seriously... Can you tell me the difference between these two things? <span style="color:red"><a href="#">foo</a></span> <a href="#"><span style="color:red">foo</span></a> Maybe you should stop acting smug when you don't know what you're doing. that makes no since because that s/s im showing u is a link.. http://forums.24-7gt.com/index.php?showforum=81 go and click it... and yes the 2 difference is the text after link Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877922 Share on other sites More sharing options...
Daniel0 Posted July 19, 2009 Share Posted July 19, 2009 It makes perfect sense. In the latter you are making the red text a link. In the former you are trying to make the link red, but seeing as the link already has its own style it's not affected by the rule you're trying to apply. If you cannot (or will not) understand it, then there is nothing I can do about it. You can show me all the screenshots in the world, but that doesn't mean you are right. You cannot say X is Y, therefore Z is Y when X and Z aren't the same things. Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877924 Share on other sites More sharing options...
Monkuar Posted July 19, 2009 Author Share Posted July 19, 2009 It makes perfect sense. In the latter you are making the red text a link. In the former you are trying to make the link red, but seeing as the link already has its own style it's not affected by the rule you're trying to apply. If you cannot (or will not) understand it, then there is nothing I can do about it. You can show me all the screenshots in the world, but that doesn't mean you are right. You cannot say X is Y, therefore Z is Y when X and Z aren't the same things. Ok then tell me how to add a red link to my css class, since u deleted my topic just cause ur mad? Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877925 Share on other sites More sharing options...
Daniel0 Posted July 19, 2009 Share Posted July 19, 2009 Knock off your personal attacks. Both in PMs and here. You've been told the solution numerous times. I refuse to help you anymore. Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877928 Share on other sites More sharing options...
Monkuar Posted July 19, 2009 Author Share Posted July 19, 2009 Knock off your personal attacks. Both in PMs and here. You've been told the solution numerous times. I refuse to help you anymore. personal attacks? im just talking to you.. Anyway sorry.. but applied the class="lol123" to my index.php with a href and it worked, but when i apply it here: $subject = "<span class=\"lol123\">$subject</span>"; it's still not working any idea? thank Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-877929 Share on other sites More sharing options...
MadTechie Posted July 19, 2009 Share Posted July 19, 2009 it's still not working any idea? thank Wow, Maybe you should read back as Daniel has given you solution already.. and example of why what your trying wont work and how to set it up to work.. I think you should create a blank html file and try a few static tests, just so the basics are clear in your head.. Then try the following Can you tell me the difference between these two things? <span style="color:red"><a href="#">foo</a></span> <a href="#"><span style="color:red">foo</span></a> Then LOOK at what your current output and you should see the solution! Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-878015 Share on other sites More sharing options...
haku Posted July 19, 2009 Share Posted July 19, 2009 You are a much more patient man than I Daniel. Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-878024 Share on other sites More sharing options...
xcoderx Posted July 19, 2009 Share Posted July 19, 2009 This guy is insane, from morning he bugged with his omg and wtf, thats his styling knowledge hehe Link to comment https://forums.phpfreaks.com/topic/166475-wont-make-it-turn-red-wtf/page/2/#findComment-878103 Share on other sites More sharing options...
Recommended Posts