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 8077183
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T15:25:19+00:00 2026-06-05T15:25:19+00:00

How do I set conditions to affect all images within my webpage (via CSS)

  • 0

How do I set conditions to affect all images within my webpage (via CSS) except for one particular image which I have already set the conditions for specifically?

For example:

#rightMain img{
    width: 100%;
    height: 100%;
    border: 1px solid #000;
}

This affects any images within the #rightMain ID.

However,

img{
    height: 100%;
}

This also affects the image in the #rightMain ID in that is skews the overall resolution of the image, causing it to look unnatural.

I would like to know how to affect all images except for the one in #rightMain as I have applied specific formatting to this image and do not wish to change it; it must exist in one state, and in one state only, within the #rightMain div.

I am aware of declaring a div class/ID to affect child/parent/sibling elements, etc, but I cannot seem to be able to figure this one out.

My main aim is to keep the image within #rightMain exactly as it is declared, but to also be able to affect all images – excluding the aforementioned image – throughout the rest of the page/site.

Any help would be greatly appreciated.

Many thanks.

  • 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-06-05T15:25:20+00:00Added an answer on June 5, 2026 at 3:25 pm

    you are setting height: 100% with both selectors – I can’t see where is the difference that is causing you problems?

    the only thing that comes to my mind before you clarify your question, is to have:

    #rightMain img {
        width: 100%;
        height: auto; /*override height: 100%; */
        border: 1px solid #000;
    }
    
    
    img{
        height: 100%;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a set of 50 items and many conditions that specificy which element
I have a dynamic set of conditions that are used in a where clause.
I would like to retrieve all rows matching a set of conditions on the
I have a number of permissions, and based on a set of conditions these
here are two set of conditions and I want to block all url with
A page displays a banner image which is set to float such that re-sizing
I'm trying to set conditions on a jQuery event. I have an input element
I have a set of conditions in my where clause like WHERE d.attribute3 =
In the OnFormShow event I need (for a particular set of conditions) not to
I have a set of conditions that I need to use to retrieve some

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.