Solved

Question about this CSS

Posted on 2011-09-18
3
192 Views
Last Modified: 2012-05-12
     Does the int.wrappedElement class just impact an image? Does it extend wrappedElement ?

    .wrappedElement {
        border: 1px solid red;
        background-color: pink;
      }

      img.wrappedElement {
        border-width: 2px;
      }
0
Comment
Question by:newbieweb
3 Comments
 
LVL 40

Assisted Solution

by:gurvinder372
gurvinder372 earned 250 total points
ID: 36558152
it only impacts the images with wrappedElement class
0
 
LVL 8

Accepted Solution

by:
Jen0910 earned 250 total points
ID: 36561173
To get the 2px boder to apply to all images within a container with ".wrappedElement" class without having to manually add the 2px boder class to every image in HMTL, you would need the 2nd rule to be .wrappedElement img {border-width: 2px;}

img.wrappedElement {border-width: 2px;} would only apply to an image with the class manually added to it in HTML.
0
 

Author Closing Comment

by:newbieweb
ID: 36564198
Thanks!
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Change of column alignment in div 2 26
Are these icons a web font? 3 23
Popup write two lines 3 22
[Bootstrap] Navigation Bar Collapse 27 33
Styling your websites can become very complex. Here I'll show how SASS can help you better organize, maintain and reuse your CSS code.
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to style elements, such a divs, with a "drop shadow" effect using the CSS box-shadow property Start with a normal styled element, such as a div.: In the element's style, type the box shadow property: "box-shad…

735 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question