Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to target CSS3 columns individually with selectors?

The design I am working to has different backgrounds for alternate columns. Is it possible to set up different tiling backgrounds for each column,

e.g.

column:nth-child(n+1) {background:url(tile1.gif) repeat-x; }

Or do I have to fall back on a huge background image that tiles every two columns?

like image 416
gpr Avatar asked Nov 02 '12 04:11

gpr


People also ask

What properties available in css3 for multiple columns select one or more?

CSS Multi-column Propertiescolumn-gap. column-rule-style. column-rule-width. column-rule-color.

How do you target an element in CSS?

The target selector is used to represent a unique element (the target element) with an id matching the URL's fragment. It can be used to style the current active target element. URLs with a # followed by an anchor name link to a certain element within a document. The element being linked to is the target element.


1 Answers

Unfortunately you cannot change the color of the columns:

It is not possible to set properties/values on column boxes. For example, the background of a certain column box cannot be set and a column box has no concept of padding, margin or borders.

From w3.org: 2. The multi-column model

like image 125
insertusernamehere Avatar answered Sep 18 '22 06:09

insertusernamehere