4
Hello, I have a block div
in the form of a vertical column of indeterminate width and height, as they depend on the amount of content and the device, and I want inside it to have another block div
at the top that has width: 100%;
but the height ( height ) must be 53% relative to the width ( width ) of that block.
With an image instead of a div block I can do using max-width: 100%;
, but of course I need a block div
.
Better understand : http://jsfiddle.net/Lbk11L71/1/ .
I can’t use javascript!
And what goes inside that div? Give more information because if you don’t need anything inside (i.e., visual only) you can use
padding
:fiddle
– Renan Gomes
inside it I want three proportional blocks, one large floating on the left and two small floating on the right
– Danillo Eder
The size in percent of the objects is relative to the context where they are, in this case I believe you will need to place another div with 100% height and the one within it with relative height.
– touchmx
I don’t quite understand, you can make an example on http://jsfiddle.net/ please ?!
– Danillo Eder
have tried using a max-width or max-height.
– Felipe Henrique
yes :-( I already tried
– Danillo Eder
See if my answer solved your problem.
– Paulo Costa