Former Member
inherit
guest@proboards.com
225992
0
Nov 23, 2024 8:19:55 GMT -8
Former Member
0
January 1970
Former Member
|
Post by Former Member on Dec 20, 2016 15:54:48 GMT -8
vertical-align will only work for inline elements
If you set the parent to "text-align: center" that would center it horizontally(as long as the parent is a block element(100% width))
If you want to center it using flex, first the parent needs a height, then "jusitify-content: center" and "align-items:center" will work for you.
If you want to set something like a modal to the center of the screen, you need to use negative margins or translate
So if the modal is 600px wide, set left 50% margin-left: -300px, same for the top, or you should really use translate3d(-50%, -50%, 0)
|
|
inherit
I need a new CT, thinking.... [insert Jeopardy theme song here]
110769
0
Aug 21, 2021 0:07:21 GMT -8
Tumbleweed
20,825
September 2007
tumbleweed
|
Post by Tumbleweed on Dec 21, 2016 0:11:40 GMT -8
Kami and Alan Vende , The only reason I jumped in here was because Kami said it was not centered for her and when I looked at it, the avatar was totally to the right. When a few hours passed I figured real life took Kami away so stepped in. @synthtec , I was actually playing with that ^^^as a option, but abandoned it for what I know does work but evidently, it isn't working for Alan. I'll just step out of this so as not to confuse things more. I am curious though Alan, was it centered how you wanted it on my custom page or not?
|
|
Kami
Forum Cat
Posts: 40,198
Mini-Profile Theme: Kami's Mini-Profile
#f35f71
156500
0
Offline
Jul 24, 2021 11:48:29 GMT -8
Kami
40,198
July 2010
kamiyakaoru
Kami's Mini-Profile
|
Post by Kami on Dec 21, 2016 1:05:11 GMT -8
Tumbleweed - that's fine! I had a feeling only that it wasn't centred because alan had changed the CSS, so i was wondering what he had changed and why.
|
|
inherit
133146
0
Nov 16, 2024 15:51:08 GMT -8
Alanna 🥀🖤
3,564
November 2008
alannab
|
Post by Alanna 🥀🖤 on Dec 21, 2016 3:51:46 GMT -8
Just saying that flex box will work wonders with this.
|
|
#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Dec 21, 2016 10:29:52 GMT -8
Just saying that flex box will work wonders with this. Flexbox is a very helpful layout mode for CSS, so I agree with you, but I'd like to point out that it's only partially supported by IE 11 which is a problem in my opinion. I recommend refraining from using it for another year or so since there are quite a few people on IE 10 and even 9. caniuse.com/#feat=flexbox
|
|
#eb7100
33409
0
1
Nov 13, 2024 16:56:46 GMT -8
Brian
48,130
November 2004
smashmaster3
|
Post by Brian on Dec 21, 2016 10:37:24 GMT -8
Just saying that flex box will work wonders with this. Flexbox is a very helpful layout mode for CSS, so I agree with you, but I'd like to point out that it's only partially supported by IE 11 which is a problem in my opinion. I recommend refraining from using it for another year or so since there are quite a few people on IE 10 and even 9. caniuse.com/#feat=flexboxWe no longer officially support anything below IE11 based on our usage analytics (use percentage for a previously supported browser has to be extremely low for us to drop support for it). It should be fine for them to use flexbox right now. As a testament to this ProBoards v6 will be much more highly reliant on a flexbox layout, something we wouldn't be confident doing were that not the case.
|
|
#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Dec 21, 2016 10:44:57 GMT -8
That's great to hear, thanks for the information. Seems like the automatic browser updates are really helping.
|
|
inherit
133146
0
Nov 16, 2024 15:51:08 GMT -8
Alanna 🥀🖤
3,564
November 2008
alannab
|
Post by Alanna 🥀🖤 on Dec 21, 2016 12:40:52 GMT -8
*doesnt give a flying crap about IE*
|
|
inherit
194230
0
Nov 21, 2015 5:56:42 GMT -8
Alan Vende
4,215
May 2013
l1o2u3i4s5
|
Post by Alan Vende on Jan 4, 2017 13:11:09 GMT -8
My apologies, I thought I had responded to this thread. Thank you all for your help. I have thought about it and realized that Kami is correct, it is how I originally said I wanted it. I just didn't realize at the time that I was saying that "it's doesn't look centered" that it cannot be unless the div box below it is taken out. I didn't realize that what I was looking to do was have it horizontally centered. Thank you so much for all of your help! I hope you all had a great holiday season!
|
|