Hello, I basically trying to erase the underline on the websitelink. I have this :

style.css

#newlink a:link{font-color:blue; list-style:none;}

weblink.php

<div id="newlink"><a href="http://www.website.com">www.website.com</a></div>

What else should I edit? The weblink is still underline and the font color still does not change.

Dani AI

Generated

Quick summary and root causes: the CSS in the first post uses an invalid property and the HTML anchor is malformed, so browsers ignore the rule and the link markup is broken. has a bad anchor string inside the href value; is correct that you need to set the color and remove text decoration, but you must also cover all link states and make sure your rule is not being overridden by Bootstrap or another stylesheet.

A clean, working approach — fix the HTML and apply rules for all states. Example of corrected markup and selectors to use:

<div id="newlink"><a href="http://www.website.com" rel="nofollow">www.website.com</a></div>
#newlink > a:link,
#newlink > a:visited {
  color: #0066cc;
  text-decoration: none;
}
#newlink > a:hover,
#newlink > a:focus,
#newlink > a:active {
  text-decoration: none;
}

Troubleshooting checklist: ensure your stylesheet is linked after Bootstrap (order matters), clear browser cache, and use the browser inspector to see which CSS rule wins (look at Computed and Styles). If a framework rule is still stronger, increase selector specificity or move your rule later; use !important only as a last resort. For how text-decoration and pseudo-classes behave, see the MDN reference for text-decoration (https://developer.mozilla.org/en-US/docs/Web/CSS/text-decoration).

#newlink a {
    color: blue;
    text-decoration: none;
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.