Pass width and height as parameters to CSS selector -


i've few .containers css selectors wraps around input boxes have same attributes except width , height. possible pass width , height when define class="container" ?

maybe i'm not understanding correctly, want send width , height of container class elements class later on inherit width , height?

not pure css. it's called cascading style sheets, because can't go in reverse, if makes sense.

it's easy javascript, though. in jquery, example, do:

$(document).ready(function() {     var width = $('.container:first').css('width');     var height = $('.container:first').css('height');     $('.container').css({'width': width, 'height': height}); }); 

Comments

Popular posts from this blog

asp.net - repeatedly call AddImageUrl(url) to assemble pdf document -

java - Android recognize cell phone with keyboard or not? -

iphone - How would you achieve a LED Scrolling effect? -