I have a div that currently is sitting correctly 5% from the left, but i want it to be at the bottom also, and everytime I add position:absolute to it, it creates scrollbars bottom and right.
I have tried everything and cant position it correctly without the scrollbars appearing.
Apologies but I need to ask a number of questions first
It may seem like a strange question but what does bottom refer to exactly?
The bottom of the viewport, or the bottom of a parent div, or the bottom of the document?
If its supposed to be fixed at the bottom of the viewport then you would need position:fixed instead.
e.g.
position:fixed;
bottom:0;
left:5%;
width:auto;/* or 95% if you want it to the right edge*/
If it’s not a fixed element you are looking for then the absolute element’s parent would need position:relative applied.
If you are absolutely placing it then why are you using margin-left:5% instead of left:5%. An absolute element without co-ordinates is offset from its current position in the flow which may not be at the left.
If your element is 100% wide then moving it 5% left will cause a viewport scrollbar as it will now take up 105% of the space. The element would need to be less that 100% wide or position with co-ordinates only.
Of course the scrollbar may be coming from a parent and you are absolutely placing the element outside of its bounds causing a scrollbar.
Depending on situation it may also be a candidate for position:sticky instead of position:fixed but I really need a little more information to answer the question fully
OMG I forgot to put the link in to offer reference sorry.
As you will see that div with the text is top left and i want it same distance from the left just at the bottom about i suppose 10% up if that makes sense.
And fixed I dont think will work, as it need to move with the image, you will see.
Ye this is where it got me PaulOB. I have added your code and its positioned correctly from left and off the bottom, but now it doesnt move to the right whe the user toggles the side menu. With relative and margin left set it moved with the image, but with absolute and fixed it stays static.
This is the the situation I was trying to get out of by trying various ways.