How to style CSS role

Tags: css

Problem :

In the following HTML

<div id="content" role="main">

the id can be accessed through #content in CSS. How do I access role="main".

Solution :

Use CSS attribute selectors:



    CSS Howto..

    How to add a color in the
    bottom content area?

    How to set an auto minimum width on column with css?

    How can I set the body color of a web page to the current width and height of the monitor?

    CSS styling of a line: how to get the line to move with the header above it

    How to change the background color of a div in HTML/CSS

    How to margin div inside other div?

    How to make divs appear and disapear on hover in css?

    How to give a matte-finish (non-glassy) look to an image with CSS?

    How can I get the body to continue look the same when a div inside overflows to the right?

    How to use the .css function with jQuery

    How to place an element in top of another using CSS (without using absolute position)?

    How to make a simple plus one voting system in code igniter

    How to adjust website according to screen resolution

    How to use different CSS in the same page

    How to create a WordPress theme that use BootStrap?

    How to style pseudo counter in CSS

    How to convert bullet points into horizontal list?

    How to implement easeOutBack easing in css transform animation

    How to keep transparent radial background smooth in browsers other than Chrome?

    How do you replicate this box-shadow effect?

    How do I conclude the right directory path when including in CSS/JS/HTML?

    How would you replicate these boxes in CSS?

    how to prevent css inherit?

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

    How to select an element that has id starting with a digit (css)?

    How to Vertically Center 2 anchor tags with CSS?

    How to style checkbox using CSS?

    How to use jQuery to check if element breaks to the next line?

    How to make input+label in a form appear one by one?

    How do I apply the “outline” CSS property with JavaScript?