GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   need HTML help plese .. (https://gfy.com/showthread.php?t=163549)

Andy 08-13-2003 03:57 PM

need HTML help plese ..
 
hi there,
I'venot posted for a long time and now I am asking for some help .. I am a bitch I know ..
well but anyways .. in case anyone know

I need to "highlight" the same word everywhere on the page .. just make it bold or other color or something like that ... is there any style set trick or something ...
:helpme

SicChild 08-13-2003 04:01 PM

You cannot do that with HTML/css.

thediablo 08-13-2003 04:02 PM

?
PHP Code:

<style>
 .
boldtext font-weightbold; }
</
style>

<
font class="boldtext">SAME TEXT</font

like that?

SicChild 08-13-2003 04:04 PM

PHP Code:

function highlight(){
  
$numargs func_num_args();

  if (
$numargs 1) { echo "Error in function highlight(): No arguments passed to function"; }
  
$string func_get_arg(0);

  if(
$numargs >= 2){ $keyword func_get_arg(1); }else{ $keyword $string; }
  if(
$keyword hahahaha "") { $keyword $string; }

  if(
$numargs >= 3){ $b func_get_arg(2); }else{ $b "yellow"; }
  if(
$numargs >= 4){ $f func_get_arg(3); }else{ $f "black"; }

  
$string preg_replace('/('.$keyword.')/i'"<span style=\"color: $f; background-color: $b;\">$1</span>"$string);

  return 
$string;


Examples for above code:
$phrase = "This is a test";
$search = "T";
$test = highlight($phrase);
$test1 = highlight($phrase,$search);
$test2 = highlight($phrase,$search,"green");
$test3 = highlight($phrase,$search,"#000000","rgb(255,255,2 55)");

Andy 08-13-2003 04:10 PM

thnx SicChild,
I know how to do that in PHP .. just was wondering if it is possible in pure html/css coding ...

queer 08-13-2003 04:12 PM

Didnt he mean HTML/JS and not serverside?

Andy 08-13-2003 04:23 PM

yep I did mean client side ..

SicChild 08-13-2003 05:00 PM

There may be a j.a.v.a.s.c.r.i.p.t solution to this. Want to ICQ me?


All times are GMT -7. The time now is 09:14 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123