CSS: How to target all elements within a given ID

Tags: css

Problem :

Instead of doing the following to give a text color to all elements on the page:

* {color: red;}

Is there a way to only apply it to all elements within a certain id? Something like this:

#container * {color: red;}

Solution :

Actually yes, exactly like you mentioned.

#container * { color: red; }

    CSS Howto..

    How can I mix vertically-centered elements with different font sizes and retain consistent line height?

    How to implement small text list search functionality using CSS attribute selectors

    How to contain a scrollable div element completely within another?

    HTML element positioning - How do I have an element always stay in the visible area without javascript

    How to make a div snap to min or max size, without any sizes in-between?

    How can I make list item spacing more acceptable in html/css email for all viewers?

    CSS - How to make
    side by side not wrap when user make browser size changing?

    How to change text from black to white upon hover on background black?

    How can I make a wrapper's css not apply to it's contained elements [closed]

    CSS: How to change background color [closed]

    How to show just one line of text in paragraph with width 100% which is part of the table cell?

    Bootstrap table how hidden, when toggled visible using javascript it does not show correctly

    How can I use symbol fonts like marvosym in the browser?

    SCSS / Sass: How do i change a mixin to output specific CSS?

    How can I use CSS to make a div float over my text whilst remaining in the right spot?

    Having Two HTML issues with PHP DOM: 1.) DOMDocument::createEntityReference $name values and 2.) how to add multiple CSS classes an element?

    How can I make a DIV background change color on hover if the DIV has a class of “disabled”? [closed]

    How to add hover effect to using CKEditor?
    Here is a script to highlight columns where there is checkmarks with an orange background-color. var CKE = $( '.editor' ); CKE.ckeditor(); var columnIndex=0; $("#update").click(function(){ // Output CKEditor's result in...
    Read more

    how can i center the footer text in the bottom of the page regardless of screen size

    Google font - how to specific font-family If they have the same name?

    How to enforce image max-width when using bootstrap 3?

    How to line up images horizontally and center with css when using a premade javascript magnifying glass?

    How to over ride the transparency aspect in CSS

    How do I make the whole area of a list item in my navigation bar, clickable as a link?

    how to keep conditional CSS statements for internet explorer in Express (Node.js) template

    How to style an asp.net menu with CSS

    How can I change using jekyll bootstrap navbar colour?

    How to add css and js files on node pages independent of the theme?

    How to Set all children start with same line of main parent

    How to align div first left then top in div parent?