html - Make inner element wider than parent element by a set amount -


i have element inside element, , inner element wider parent set amount - lets 40px. if parent 500px wide:

example of effect i'm after

but if parent 600px wide, example, i'd child 640px wide.

without tying outer element particular width, i'd inner element 40px wider outer element. there css way achieve this?

i don't know width increase, can give padding of inner div via css may work you.

you can give inner div css like

.innerdiv {     /*padding-right: 20px; */      padding:20px;  /*this give left , right side 20px padding*/ } 

how increase width:auto div's width x pixels using pure css


Comments

Popular posts from this blog

node.js - Mongoose: Cast to ObjectId failed for value on newly created object after setting the value -

gradle error "Cannot convert the provided notation to a File or URI" -

python - NameError: name 'subprocess' is not defined -