How do I place one box in the centre of the other?

kevintheradioguy

Salt
Supporter
Roleplay Availability
Roleplay Type(s)
My Interest Check
This is my first time using classes in BB, but I figured it won't be any different than your usual CSS, so sorry if I miss the obvious.

Basically, what I'm trying to do is this:
1552515147981.png

I have four classes: one for the main area, in which we have "header" image box, and to the right of it: one for the secondary area (bigbox), and one for the text (greybox).

I wanted to make greybox align in the centre of bigbox both vertically and horizontally, while the text inside would have the alignment of my choosing (part's gonna by justified, part aligned to the right); however, I cannot figure out how do I place a greybox inside the bigbox properly, as whatever I try (align, justify-content, etc.), it always stays in top left corner. I am using px measurement, although it's usually per cent one for me, as I am confused about aligning images of specific sizes to per cents :c

Here are the codes I use for bigbox and greybox:

Code:
[class=bigbox]
display:inline-block;
vertical-align: center;
width:800px;
height:1000px;
background: #0f0f0f;
[/class]
Code:
[class=greybox]
width:90%;
height:90%;
padding:10px;
background-color:#757575;
color:#151e24;
[/class]


That being said, I wonder if there's a way to add effect to the imagebox if you hover over greybox area? I wanted to make it fade when you scroll through the greybox text.
 
Set greybox with margin:auto; ;3
 
I tried everything I could with the flex, and it didn't work; so I've decided not to be fancy, and just take the entire height instead.

Can the staff archive the thread, as the help has been provided and used to the best of my abilities?
 

Users who are viewing this thread

Similar threads

Back
Top