html - Does adding a position: absolute to a block element make it behave like an inline? -


please refer - https://jsfiddle.net/6nyh5p40/

position: absolute; 

on div making behave inline element. remove property , see div behaves should, block element.

my question - adding position: absolute block element make behave inline?

yes, block element feature of having full width of parent's content area not honored when element absolutely positioned.

if want retain width (100% of container) of block element, add postion: relative; parent of absolute element, set width of absolute element 100%.


Comments

Popular posts from this blog

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -

javascript - Using jquery append to add option values into a select element not working -

javascript - Restarting Supervisor and effect on FlaskSocketIO -