- This topic is empty.
- The forum ‘CSS’ is closed to new topics and replies.
I have a centered image and i’d like to anchor a textarea directly over it. but because the image is centered if the screen size changes the textarea will move outside of the image.
Example and code in jsfiddle https://jsfiddle.net/rxg7t2ca/1/
I’ve been learning how to position things with the tutorial from http://learnlayout.com/display.html
and i’ve been searching online for an answer but I cant seem to find a solution on how to do this.
Any assistance or being pointed to the right direction would be greatly appreciated.
A few things you can try;
instead of using pixels to position your text box from top and left, try percentages instead, along with this https://css-tricks.com/absolute-positioning-inside-relative-positioning/
have a look at intrinsic/aspect ratio text boxes https://css-tricks.com/aspect-ratio-boxes/