-3

I want to develop the next thing.

See example image: Overlapping div with text and background-color with a smaller width than the text

How can I achieve this? I'm using the Visual Composer in Wordpress. You can see what I made here: http://glashelder.id-buro.nl/hometest/. This is not how I want it.

Alireza
  • 2,319
  • 2
  • 23
  • 35

2 Answers2

0

add this to your css:

.wpb_single_image.vc_align_left {
    text-align: left;
    position: relative;
    z-index: 1;
}
  • Thanks! Got a little bit closer. How can I achieve the text will be stick in the middle (vertical). I also want some plus margin on the top and the bottom and min margin on the right. – refreshfabian Jun 26 '17 at 12:06
0
  • You can make an image by merging white and sky color portion and set that image as background-image of that div. Then select row layout(probably 2/3+1/3 is good as per image) in the visual composer.
  • Or you can do this via CSS by giving absolute position one of the div and set some margins to get same design as per image but you will need to do some more design and write css for responsiveness. So I think first option is better. :)
Brijesh Borad
  • 178
  • 10