The forum of the forums
Welcome to the Official Support Forum of Forumotion!

To take full advantage of everything offered by our forum, please log in if you are already a member, or join our community if you've not yet.



Create a free forum like this one.

Vertically Centering Category Title

View previous topic View next topic Go down

Solved Vertically Centering Category Title

Post by Rhino.Freak on November 27th 2015, 4:28 pm

I can't seem to align the category titles of my forum, someone help Razz
It's on top and I've tried many css rules but it doesn't move a pixel bwi bwi

Phpbb3
Forum Link


Last edited by Rhino.Freak on November 30th 2015, 2:51 pm; edited 1 time in total

Rhino.Freak
Helper
Helper

Male Posts : 1246
Reputation : 105
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

Solved Re: Vertically Centering Category Title

Post by SLGray on November 27th 2015, 5:16 pm

CSS:
Code:
.dterm .table-title, .table-title h2 {
    color: #0080FF;
    font-family: monospace;
    font-size: 1.45em;
    font-weight: 700;
}

Is this the one you changed?


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36697
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: Vertically Centering Category Title

Post by Rhino.Freak on November 27th 2015, 5:19 pm

Yes indeed. I forgot to mention that the 1st category is an image so I'm talking about others.

Rhino.Freak
Helper
Helper

Male Posts : 1246
Reputation : 105
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

Solved Re: Vertically Centering Category Title

Post by SLGray on November 27th 2015, 6:03 pm

CSS:
Code:
.table-title, .table-title h2


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36697
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: Vertically Centering Category Title

Post by Rhino.Freak on November 28th 2015, 9:39 am

@SLGray wrote:CSS:
Code:
.table-title, .table-title h2

I don't understand what you're trying to convey here.

Rhino.Freak
Helper
Helper

Male Posts : 1246
Reputation : 105
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

Solved Re: Vertically Centering Category Title

Post by SLGray on November 29th 2015, 12:00 am

Code:
.table-title, .table-title h2 {
     margin-left:  YOUR NUMBEpx;
    or
    margin-right:  YOUR NUMBERpx;
}


When your topic has been solved, ensure you mark the topic solved.
Never post your email in public.


SLGray
Administrator
Administrator

Male Posts : 36697
Reputation : 2445
Language : English
Location : United States

http://ztwds.forumotion.com/

Back to top Go down

Solved Re: Vertically Centering Category Title

Post by Rhino.Freak on November 29th 2015, 7:13 am

That is not working. No matter what margin values I put it doesn't move :/


EDIT: I changed some templates in my forum (code provided to me by @Ange Tuteur long ago), however my question still remains the same.
I want the category title to appear in middle of the whole block. It's currently at the top. I CAN move them using the
Code:
margin-top
code HOWEVER, it effects all the categories and the already aligned ones get pushed down bwi
HALP NEEDED

Rhino.Freak
Helper
Helper

Male Posts : 1246
Reputation : 105
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

Solved Re: Vertically Centering Category Title

Post by @Mark on November 29th 2015, 7:08 pm

Try giving this a shot, add this to your CSS:
Code:
.leftblock .table-title {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    height: 33%;
    margin: auto;
}

@Mark
Forumember

Male Posts : 187
Reputation : 37
Language : HTML | CSS | Javascript | C | Java
Location : Republic of the Philippines

http://help.forumotion.com/

Back to top Go down

Solved Re: Vertically Centering Category Title

Post by Rhino.Freak on November 30th 2015, 9:05 am

It does the job roughly, but it still isn't perfect. Isn't there any proper way to do this in html,css?
Thanks for the response @@Mark

Rhino.Freak
Helper
Helper

Male Posts : 1246
Reputation : 105
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

Solved Re: Vertically Centering Category Title

Post by Ange Tuteur on November 30th 2015, 2:32 pm

Normally if you want to vertically center something, the parent element needs to have a set height. But anyway, some ways to give the effect of vertically centering an element would be equal padding on the top and bottom ( without a set height ). If you have a set height, you can adjust the line-height to vertically center the text.

This also has some good information : https://css-tricks.com/centering-css-complete-guide/

Click vertically, and then choose which type of element you're trying to center. ( e.g. inline, block.. )

Ange Tuteur
Forumaster

Male Posts : 13028
Reputation : 2704
Language : EN10, FR5
Location : Pennsylvania

http://fmdesign.forumotion.com

Back to top Go down

Solved Re: Vertically Centering Category Title

Post by Rhino.Freak on November 30th 2015, 2:51 pm

Alright! I'll look into it. Thanks for help people! Smile

Rhino.Freak
Helper
Helper

Male Posts : 1246
Reputation : 105
Language : English
Location : Mumbai, India

http://freetest.forumotion.net/

Back to top Go down

Solved Re: Vertically Centering Category Title

Post by APE on November 30th 2015, 3:41 pm

Topic solved and archived





APE
Manager
Manager

Male Posts : 8631
Reputation : 756
Language : fluent in dork / mumbojumbo & English haha
Location : STUCK IN FORUMOTIONS SERVERS HELP ME !!!!!!

http://chatworld.forumotion.co.uk/

Back to top Go down

View previous topic View next topic Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum