Is there a way to modify the appearance of the links listed below?

Having some trouble styling the links on my website with CSS. Can't figure out why they won't change. I've used a class because this code is repeated 4 times (for reasons unknown :P). Tried putting 'a' in front of .profileLinks, but that didn't work either :(

This is the external CSS style sheet:

#trends .profileLinks a:link{
    color:#0000FF;
    text-decoration:none;
    background: transparent;
}

#trends .profileLinks a:visited {
    text-decoration: none; 
    color: #0000FF; 
    background: transparent;
}

And here is the HTML code:

<div id="trends">
    <h1> Trends... </h1>
    <a href="#" title="Profile Image"><img src="logo.png" alt="Profile Image" height="59" width="68"> </a>
    <a class="profileLinks" href="#" title="User's Profile Name"> Mark Fonacier </a>
    <a class= "commentLinks" onClick ="javascript:ShowHide('HiddenDiv')" href="javascript:;" ><i>Comment</i></a>
    <br/>
    <p>
        PostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPostPost
    </p>
    <a onClick ="javascript:ShowHide('HiddenDiv')" href="javascript:;" ><i>Comment</i></a>
    <div class="mid" id="HiddenDiv" style="DISPLAY: none" >
        <form method="post" action="">
            <textarea name="comments" cols="60" rows="2" placeholder="Enter your comments here..." maxlength="1000"> 
                </textarea>
            <input type="submit" value="Submit" />
        </form>
    </div>
    <br/>

Answer №1

When targeting elements with a specific class,

#trends .profileLinks a:link

You must ensure that the class is applied to the correct element, in this case the <a> tags. Adjust the selector as follows:

#trends a.profileLinks:link

Make sure to apply the same adjustment to the other rule as well.

Answer №2

Have you made any modifications to your stylesheet?

You can attempt the following solution:

#trends .profileLinks a:link {
    color:#0000FF !important;
    text-decoration:none;
    background: transparent;
}

Answer №3

Check out this neat solution: Click here I've set the color for all links, feel free to customize it to your liking.

Similar questions

If you have not found the answer to your question or you are interested in this topic, then look at other similar questions below or use the search

Saving Images in HTML 5 Web SQL Database

Is it possible to save images offline using HTML 5 Web SQL Database? ...

Exciting animation in sidebar links text during toggle transition animation running

As the sidebar collapses, the text adjusts to its width in a choppy transition I'm seeking a way to display the text only when it fits perfectly within the sidebar without breaking into two lines I want the text to appear only after the collapse tra ...

The alignment of margins appears as intended in Opera, Chrome, and IE, but unfortunately it does not

I have exhausted all possible options, but I am still struggling to get this page to appear correctly in Firefox. When you click inside the square, a menu with images should display on the right side. It is properly aligned in every browser except for Fire ...

Steps to position images and text side by side in a grid layout

Trying to create a grid layout with profile images and text aligned next to each other, but struggling with CSS. If anyone could provide some guidance, that would be greatly appreciated! Here is the HTML code snippet: <div class="col-sm-3" ...

Looking to use Jquery to translate an image both on and off the screen with full width and height?

Imagine a scenario where a full-screen image remains hidden upon page load. When a user clicks a link, the image smoothly slides up from the bottom of the page. Upon clicking the image, it should smoothly move off the page as if it were being translated do ...

What is the best way to mirror an image using CSS3?

I'm looking to create a minimalist front page for my wife's jewelry website. I envision a simple layout with a blurred background and a sleek title at the top. In the center of the page, there will be several sections dedicated to different types ...

Incrementing counters within nested div elements

Looking to implement a counter-increment feature on ordered lists. The goal is for each ol to pick up where the previous count left off. The functionality is successful when there are no separate wrapping divs around the ols. However, the issue arises whe ...

Developing web applications using a combination of PHP, MySQL, and

I am in need of creating an HTML form that functions as CRUD. This form should be able to record inputs such as "row_number", "channel_name", and "ip_address". It will store all the data in a MySQL table using the "ORDER BY row_number" function. The form i ...

Is there a copyright concern regarding CSS?

There are countless websites that spark my creativity. If I am inspired by a particular design, CSS, or JavaScript on one of these sites, am I allowed to copy it to my local folder and use it? For instance, let's say I come across a website called xy ...

Make the dropdown feature function properly with Selenium

I am attempting to choose "L4 Segmentation" from the Category dropdown list. <div data-fragment-id="auditable-entity-form"> <form data-behavior="fragments" class=" new_auditable_entity warns-when-has-unsaved-data " id="new_auditab ...

Adding graphs dynamically to Dygraphs allows for real-time updates and interactive data

I recently started using Dygraphs for one of my projects and I am still learning how to work with it. After reading through the documentation and looking at a few examples, I noticed that the constructor for Dygraphs requires a div element where the graph ...

Extracting input from a form with Java Spring Controller

I am currently struggling with retrieving the value from my form. This value is needed to refresh the same page, where I intend to use it as a filter (filtering by city): <form action="/todoslosusuarios" modelAttribute="TodosLosUsuarios"> ...

Reasons for aligning inline elements with input boxes

I am facing a challenge with aligning a series of inline elements, each containing an input text box, within a single row. The number and labels of these input boxes can vary as they are dynamically loaded via AJAX. The width of the div housing these inli ...

Gap created between two td or tr elements

Can someone please help me solve a troubling issue I'm facing with my CSS and HTML code? body { background-color:#ffffff; margin:0; padding-top:0px; } table.main-table-default { margin:0 auto; background-color:#00ffff; width:700px; border-collapse:co ...

Troubleshooting issues with Bootstrap's responsiveness configuration

I've been working on creating a responsive user login page using Angular 5. It looks great on full-screen display. https://i.sstatic.net/YQrL5.png However, when I resize the browser window, the responsiveness seems to break. https://i.sstatic.net/4 ...

Clicking a button in VueJs will trigger the clearing of the displayed text and the subsequent execution of

Hello, I am new to the world of web development and I'm currently learning vue.js. I am working on an app where I input an ID and upon clicking the search button, a method is called. This method utilizes axios to make a request to the controller and ...

What is the best way to position a div on the left side when it's large and move it to the

In my coding, there is a particular div element: <div id="UnitInfoDiv" class="form-group row hidden"> <div id=@UnitPartialViewHtmlId class="row"></div> <div class="row"> <div class="col-md-6"> Is ...

Styling for jQuery mobile panels disappears when used on multiple pages

Currently, I am working on developing a mobile application for PhoneGap using jQuery Mobile. The app consists of multiple pages within the same HTML document. I have configured it so that all pages share the same panel, but I am facing an issue with the st ...

Can one efficiently retrieve all records from table 1 alongside corresponding metadata from table 2 within the same query?

In the process of developing a compact CRM system, I am wondering if there is a more efficient approach to fetching all entries from table 1 while also retrieving each entry's metadata from table 2, labeled as tasks t2. Currently, I am executing two ...

The CSS option style is not functioning properly in Firefox

I'm having trouble getting my custom styles for an option select box to work in Mozilla Firefox using CSS. While everything looks fine in Google Chrome, the styles are not rendering correctly in Firefox. What am I missing in my CSS code to make it co ...