Div Alignment Not Working For Me
Ok I generally prefer live help but gonna give this a shot.. I am working on an alert for OBS/Streaming. Currently it wants to be in the center/middle of the viewable area. Where the name is, it expands giving the length of the name, so if I want it placed in the top right corner, and someone with a long name follows, it will screw up the placement.
SO what I have been trying to do for the last few hours, is make it want to align to the right, so when it expands, it just grows out to the left. But everything Ive googled and tried to implement isnt working. Starting to think its not possible.
I have a pen with a rough example:
https://codepen.io/BioFUSION3k/pen/eYXWaNd
As an alternative, if easier, which I also couldnt find. I had a fixed size version and the extra letters of the name where hidden by overflow. But if there was a way to shrink the font so it fits in the viewable area that could work. IE def font size is 45, so everything that fits displays as 45, but if it gets too long it could display as 35 or 20 etc.
Pen for this example:
https://codepen.io/BioFUSION3k/pen/wvOdbKb
2 Replies
I’m on mobile so can’t see properly but I see that you’re using a lot of
position: absolute
and you’re also setting width to be 100% on an element that is already going to be full with. I think you’re going at this with the wrong tools
Try getting what you need with grid or flexbox and then if you can’t then people may help with that
I think people haven’t helped is because the foundation is wrong and so there isn’t any point in tweaking it. Generally if you’re using position:absolute
for content, you’re doing something wrongthis is part of a theme purchase 😉 so i paid money for an amateur, lovely
i can generally google till i make something that works, but this doesnt respond to crap I change. Ill probably just go back to having the name cutoff and say screw it since nobody wants to help
(and not just here, nobody anywhere, help channels only work these days if they like the question)
or person