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
Post a Comment