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

  • Home
  • SEARCH
  • 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 633373
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T20:10:43+00:00 2026-05-13T20:10:43+00:00

In CSS, I want all links to have a border-bottom: 1px solid property. However,

  • 0

In CSS, I want all links to have a border-bottom: 1px solid property. However, if I have a linked image, it gets the border as well. How can I change the a property if and only if it contains an img element?

  • 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-13T20:10:44+00:00Added an answer on May 13, 2026 at 8:10 pm

    Try using Descendant Selectors:

    a img {
        border-bottom: none;
    }
    

    If it doesn’t seem to be working, first make sure that the selector is correct (i.e. is referencing the correct element(s)) by putting some crazy statements in that will make it clear which elements are being affected by the selector:

    a img {
        color: red;
        background-color: red;
        border-bottom: none;
    }
    

    When the selector is working correctly, you can then focus on the statement that isn’t working (don’t forget to remove the crazy statements, though!). It may be being overridden somewhere, so try adding !important to the end of the statement:

    border-bottom: none !important;
    

    If this works, then you need to carefully examine your CSS code and rearrange your style rules so that you’re not overriding this rule.

    If it still doesn’t work, then make sure that you are overriding the correct property with the correct value.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have the following CSS: a.enabled:hover { background-color: #f9f9f9; border: 1px solid #ddd;
I want to set the Expires header for all image/* and text/css . I'm
I'd like to be able to target text links in CSS with border-bottom on
All i want to do is apply a border-radius to an image. Here is
There seems to be too many attributes/parameters in CSS... I want to know all
I want to generate a Css that will be the same for all my
So I've got style.css which defines all my CSS classes. But I want to
I want to use the filter CSS property for both a gradient and an
I want to load an image via css that stretches to the entire screen.
i already have a css section: .leftMemberCol { width:125px; vertical-align:top; padding: 13px; border-width:0px; border-collapse:separate;

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.