CSS Style

Any idea how to change the hyperlnk text to white color. "td" has set to white color but it can't be applied to the <a> element. Thx


<td style="background-color:navy;color:white;"></td><td style="background-color:navy;color:white;">
<?php
      if (session_status() == PHP_SESSION_NONE) {
                session_start();
      }
      echo "<span id=\"userinfo\"><a href=\"signin.php\">Login</a> &nbsp;&nbsp;&nbsp;<a href=\"validatesignup.php\">Signup</a></span></td>
C--temp-CSS.png
AXISHKAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

PawełI Design & Develop SoftwareCommented:
if you want it in a css style

do
td >span#userinfo>a {
color:white;
}

Open in new window

or if you want it inline

<span id=\"userinfo\">
    <a href=\"signin.php\" style=\"color:white;\">Login</a> &nbsp;&nbsp;&nbsp;
    <a href=\"validatesignup.php\">Signup</a>
</span>

Open in new window

0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
AXISHKAuthor Commented:
Thx, it works.

Is there a way to check the attribute support for HTML element which make the coding much more easier ?

Thx
0
PawełI Design & Develop SoftwareCommented:
do you mean specifically for styling? i generally use the dev tools in chrome, but it's really something that you have to just do a lot of to figure out
0
Determine the Perfect Price for Your IT Services

Do you wonder if your IT business is truly profitable or if you should raise your prices? Learn how to calculate your overhead burden with our free interactive tool and use it to determine the right price for your IT services. Download your free eBook now!

Peos JohnPHPCommented:
Is there a way to check the attribute support for HTML element which make the coding much more easier?

When you say attribute support, are you referring to getting auto suggestion of attributes while coding?
0
AXISHKAuthor Commented:
Yes.
Othewise, any online website that allow inputing an element and display all related attrbutes for it.

Thx again.
0
Peos JohnPHPCommented:
0
Julian HansenCommented:
echo "<span id=\"userinfo\"><a href=\"signin.php\">Login</a> &nbsp;&nbsp;&nbsp;<a href=\"validatesignup.php\">Signup</a></span></td>

Take some time to learn about PHP HEREDOC syntax. Using it the above debugging / readability nightmare looks like this
echo <<< HTML
  <span id="userinfo">
    <a href="signin.php">Login</a> &nbsp;&nbsp;&nbsp;<a href="validatesignup.php">Signup</a>
  </span>
</td>
HTML;

Open in new window


Othewise, any online website that allow inputing an element and display all related attrbutes for it.
I use MDN (Mozilla Development Network) and W3Schools

Between these two sites you will find - what attributes are available, what they do and what browsers they are supported on.

A note on styling <a> elements. You need to explicitly include the a in the style in other words if you have
<div class="white-text">
   <a href="#alinktosomewhereonthepage">This should be white</a>
</div>

Open in new window

And your css is
.white-text {
   color: white;
}

Open in new window

The <a> will not be white - you have to expressly state
.white-text a {
   color: white;
}

Open in new window


This sample illustrates the concept.

Another key thing to note is that the path to the element is important.
If you have
<div class="top">
  <div class="middle">
    <span class="target">
      Red text by css
    </span>
  </div>
</div>

Open in new window

And you have
.top .middle .target {
   color: red;
}

Open in new window

The text will be red.
If you then add after this
.target {
   color: blue;
}

Open in new window

This will not affect the style on the page - you have to override the full path.

The above sample illustrates
0
AXISHKAuthor Commented:
Thx
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
CSS

From novice to tech pro — start learning today.