Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 5971709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T20:33:15+00:00 2026-05-22T20:33:15+00:00

Okay, so I’ve been able to define the standard text color according to a

  • 0

Okay, so I’ve been able to define the standard text color according to a database value by using this code:

<?php

echo '<div style="color: ' . $result->properties->fcolor . ';';<br />
echo 'background: ' . $result->properties->bgcolor;<br />
echo '">MY CONTENT</div>'

?>

The color that’s set by

$results->properties->fcolor

works nicely, except for a:link, a:hover, a:visited, and a:active. Because it’s only defining “color”, the browsers default to their own link colors.

My users choose from a selection of background and font colors and Chrome’s default blue link color doesn’t exactly work with a dark purple background… Is it possible to set up a

<style type=text/css>

inside of my PHP file and have it reference the

$result->properties->fcolor

value that the normal part of the script pulls from my database?

This is my first big site so I’m not positive about anything but I vaguely remember enabling PHP in my external CSS file using .htaccess and it didn’t successfully pull in the value of

$result->properties->fcolor

as far as I could tell.

What am I doing wrong?

Thanks in advance – amazing community here! 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-22T20:33:15+00:00Added an answer on May 22, 2026 at 8:33 pm

    IF I’m you, I would create external css for links just to define rules not color.

    for example if your links are inside div, what you can do is just define to use color of div

    div a { color: inherit; }
    div a:HOVER { color: inherit; }
    

    so when you define your color to div through php logic your links inside div will inherit that color.

    If you experience any problems with this add important to property so color of div will be used

    div a {color: inherit !important; }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Okay, so I know that using eval() isn't great, but I haven't been able
Okay so my question is this. Say I have a simple C++ code: #include
Okay,I've been following this tutorial http://coenraets.org/blog/android-samples/androidtutorial/ Basically it gives me exactly what i need
Okay ... this is a mystery to me the below code prints: ['03:20:01', 'PM',
Okay so im working on this php image upload system but for some reason
Okay, my code is currently: public MySqlDataReader CreateQuery(string queryString, string connectionString ) { using
Okay so I can't figure this out. Like a file that I using grep
Okay, I'm reading about Linux kernel development and there are some code snippets using
Okay so I've been happily using ARC in my project until I attempted to
Okay, so I've done a bit of research into using PHP to allow using

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.