1 |
|
---|---|
Posted by | Box Topper |
![]() StygianSunshine (#351913) View Forum Posts ![]() Posted on 2023-09-16 10:49:46 |
Hello! I've been working on CSS for a couple of months now and am trying to figure out how to do some more advanced things! I was wondering how to get a box topper on the textboxes in my den? I love having art of my king all over my den and I would love to have a topper like this den has! Any help would be much appreciated :3 Edit: I can't seem to edit the vertical placement of the image when using position:absolute despite trying to edit the padding and margins of the box. Are there any solutions to this? ![]() Edited on 16/09/23 @ 15:34:47 by StygianSunshine | 126/300 (#351913) |
Trace (#68847)
View Forum Posts ![]() Posted on 2023-09-16 14:05:31 |
I'll bring up a reply that I have written in a similar topic. A box topper in the case of the example you have provided could be using a mix of absolute positioning and top property. position:absolute; But you will have to be quite specific with targeting the CSS selectors you have in your stylesheet. You will have to increase the margin on top of the box where the box topper will be sitting on. Then you will have to use absolute positioning to 'command' where the image is going to sit. To explain a bit more, position:absolute ignores normal webpage flow, and no space is allocated to it. So to address it, you have to use a combination of margin and even padding in some cases to get what you want. (Also to take note: Because different devices have different dimensions, you also should consider @media and test across different devices to make sure the box topper is consistenly sitting on the boxes.) Hopefully it helps! ![]() EDIT: I went into your code to see how I can get your lioness to sit on your box. Adding this code should help. .smallbox img { ![]() Edited on 16/09/23 @ 14:10:20 by Trace (#68847) |
StygianSunshine (#351913)
View Forum Posts ![]() Posted on 2023-09-16 14:30:47 |
It's helping stop the clipping for sure, tysm! I just have to work on positioning it correctly I think :3 ![]() |
Anxiety Prime™ [11.25.22 RLC] (#191357) ![]() View Forum Posts ![]() Posted on 2023-12-04 17:37:56 |
1 |
---|