How to do something like #Card%{ } in CSS


Tags: css

Problem :

This is my css :

<div id="Card0">
  <div draggable="true" id="carte">
    <div id="no">8</div>
    <div id="Trefle"></div>
  </div>
 </div>

I will have Card1, Card2 ...

I would like to do something like #Card%{ } Is it possible?



Solution :

Unquestionably you would use a class for this:

<div id="Card0" class="card">
  <div draggable="true" id="carte0">
    <div id="no">8</div>
    <div id="Trefle"></div>
  </div>
 </div>

<div id="Card1" class="card">
  <div draggable="true" id="carte1">
    <div id="no">8</div>
    <div id="Trefle"></div>
  </div>
 </div>

<div id="Card2" class="card">
  <div draggable="true" id="carte2">
    <div id="no">8</div>
    <div id="Trefle"></div>
  </div>
 </div>

    CSS Howto..

    CSS: How to get lines to “line up” accross different columns?

    How to draw with CSS canvas a slideshow frame?

    CSS: how to make label appear right of the radio?

    How would I have a larger center bottom navbar button in jQuery Mobile default navbar?

    There is a little gap between the image and the overlay, I do not know how to fix it [duplicate]

    How to iterate over node var in Primefaces tree to set icons in CSS class from DB

    What is the best CSS trick to reduce how much HTML you need?

    jquery/css how to rescale and crop a large image to fit my display div?

    How do I target a first-child that is visible (after children that are set to display:none), with only CSS

    How to create a smooth zoom and display an overlay when another HTML element gets hovered?

    How to get margin to be relative to text amount css

    How to create diagonal boxes using css?

    How to force spaces between 2 elements when position:absolute with CSS only?

    In LESS, how to rewrite this CSS composition style?

    How to set background color in AppGyver Supersonic?

    What CSS properties govern how a webpage reacts to window resizing?

    How to get right sidebar up on main content on resize of flexible with page?

    How do I replicate the bootstrap mobile navbar toggle (without using bootstrap)?

    CSS: How to make a block to cover all width of parent block

    How to adapt CSS image container to different browser sizes

    how to center anchor tag horizontally css

    Prevent div from showing after slideUp() - jQuery

    Simple Form button submit doesn't show in IE 8-7

    How to change CSS id property depending upon screen size

    How do I adjust the spacing around the sides of list items in jquery mobile

    How to add colour classes to this css

    How to use CSS Loader in my website?

    How to remove the bottom border of a box with CSS

    how to use jquery closest function

    how to put text on the middle of an image