K
K
kozomyot2015-10-07 16:20:24
css
kozomyot, 2015-10-07 16:20:24

How to show an arbitrary sized center section in a block element using CSS?

Hello experts, please help me with this problem. Actually, the question is fully stated in the title. Is it possible to solve this problem with CSS alone? Via background is not an option, the image must be located in the HTML structure.

Answer the question

In order to leave comments, you need to log in

3 answer(s)
S
Sergey Savostin, 2015-10-07
@kozomyot

jsfiddle.net/82rqsuhd/1

S
Serdji, 2015-10-07
@ssumatokhin

You can try with the help of Flexbox layout. Videos on this topic here

N
Nastya, 2015-10-07
@nastyamyaots

A sore point, probably, for all typesetters. As far as I know, css without background cannot solve this issue. Only if you use js, especially if the layout is responsive.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question