Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 8 of 8
  1. #1
    Regular Coder
    Join Date
    Dec 2010
    Location
    Kent, UK
    Posts
    573
    Thanks
    23
    Thanked 10 Times in 10 Posts

    <strong>Messages come out in black

    I know this may not belong here in the php side of things, however in my coding i use $message= "this message is an example."

    well this is all surounded in <strong> </strong> tags, and the writing comes out in black colouring. is there a way to change this as i would like the writing to come out in white, i thought there may be a code that i can put into my inc-functions.php file which is included in every single file, as I dont want to have to go back through every page and take out the <strong> </strong> tags.

    Any help would be deeply appreciated.

    Dan
    Last edited by Dan13071992; 11-25-2011 at 11:56 PM.
    http://360-tactics.co.uk/forum/index.php

    Crime-Wave

    please post your code wrapped in tags
    please post your PHP wrapped in tags

  • #2
    Regular Coder
    Join Date
    Jul 2010
    Location
    Oregon City
    Posts
    280
    Thanks
    5
    Thanked 50 Times in 49 Posts
    Use CSS.................. color: white;

    in a css file, if you're only going to use strong tags to wrap that data in then put this:

    strong
    {
    color: white;
    }

  • #3
    Regular Coder
    Join Date
    Dec 2010
    Location
    Kent, UK
    Posts
    573
    Thanks
    23
    Thanked 10 Times in 10 Posts
    Quote Originally Posted by Adee View Post
    Use CSS.................. color: white;

    in a css file, if you're only going to use strong tags to wrap that data in then put this:

    strong
    {
    color: white;
    }
    thanks for your very speedy reply, I have done this, however they still appear in black, any help would be great. below is the $message echoing code:

    PHP Code:
    <?php echo "<font color=white><b><center><bold>$message</bold></center><b><br>"?>

    And the actual messages are
    PHP Code:
    $message"<strong>Status has been changed to Not Busy</strong><br>"
    i can post my css file if needed?
    Last edited by Dan13071992; 11-25-2011 at 11:11 PM. Reason: forgot to insert the actual $message
    http://360-tactics.co.uk/forum/index.php

    Crime-Wave

    please post your code wrapped in tags
    please post your PHP wrapped in tags

  • #4
    New Coder
    Join Date
    Nov 2011
    Location
    New England
    Posts
    62
    Thanks
    0
    Thanked 10 Times in 10 Posts
    Quote Originally Posted by Dan13071992 View Post
    thanks for your very speedy reply, I have done this, however they still appear in black, any help would be great. below is the $message echoing code:

    PHP Code:
    <?php echo "<font color=white><b><center><bold>$message</bold></center><b><br>"?>

    And the actual messages are
    PHP Code:
    $message"<strong>Status has been changed to Not Busy</strong><br>"
    i can post my css file if needed?
    First of all, you are using deprecated tags [font, center].
    Secondly, there is no <bold> tag that I know of.
    Thirdly, next time, I would suggest using classes. I.e., make a "general" or "message" class, something like that, then you can style it all at once by changing your css

    Remove the "<bold>" tags, and add this into your css file [Or add to <head>]:

    Code:
    strong 
    {
    color: white;
    }
    Last edited by mvmacd; 11-25-2011 at 11:33 PM.
    For programming information, visit irnsystems.com
    Also check out Points2Survey and earn items.

  • #5
    Regular Coder
    Join Date
    Dec 2010
    Location
    Kent, UK
    Posts
    573
    Thanks
    23
    Thanked 10 Times in 10 Posts
    you was right, <bold> is what was keeping it from working, however I now have to change every page as <bold> is what i accidently used in every single page :s lol.

    Thank You so much for your help.
    http://360-tactics.co.uk/forum/index.php

    Crime-Wave

    please post your code wrapped in tags
    please post your PHP wrapped in tags

  • #6
    Regular Coder
    Join Date
    Oct 2011
    Posts
    237
    Thanks
    11
    Thanked 5 Times in 5 Posts
    Quote Originally Posted by Dan13071992 View Post
    you was right, <bold> is what was keeping it from working, however I now have to change every page as <bold> is what i accidently used in every single page :s lol.

    Thank You so much for your help.
    It would have been easier to have had the strong like

    Code:
    strong{color: white !important;}
    Which over rides above all other css given to the the section in other areas, unless that also has a !important within it.
    Last edited by devinmaking; 11-25-2011 at 11:54 PM. Reason: wrapping the code

  • #7
    Regular Coder
    Join Date
    Dec 2010
    Location
    Kent, UK
    Posts
    573
    Thanks
    23
    Thanked 10 Times in 10 Posts
    Quote Originally Posted by devinmaking View Post
    It would have been easier to have had the strong like

    Code:
    strong{color: white !important;}
    Which over rides above all other css given to the the section in other areas, unless that also has a !important within it.
    Thank you for this, it is alot easier, as I have already taken out the <bold> tags, it still helps for if i ever miss taking out any more . thanks alot
    http://360-tactics.co.uk/forum/index.php

    Crime-Wave

    please post your code wrapped in tags
    please post your PHP wrapped in tags

  • #8
    God Emperor Fou-Lu's Avatar
    Join Date
    Sep 2002
    Location
    Saskatoon, Saskatchewan
    Posts
    16,987
    Thanks
    4
    Thanked 2,660 Times in 2,629 Posts
    Visual rendering has nothing to do with PHP.
    Moving from PHP forum to HTML/CSS.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •