Skip to content
This repository has been archived by the owner on Jul 30, 2022. It is now read-only.

Title header color and text centering #97

Closed
jmanion711 opened this issue Jun 8, 2020 · 5 comments
Closed

Title header color and text centering #97

jmanion711 opened this issue Jun 8, 2020 · 5 comments

Comments

@jmanion711
Copy link

Setup

  • Browsers and versions: Chrome 83.0.4103.97
  • MediaWiki version: 1.34.1
  • Database version: MySQL (MariaDB 10.4)
  • PHP version: 7.4.6 (apache2handler)
  • Pivot version: 2.2.0
  • Extension version (if connected to the issue):

Issue

I'm sure this is user error but I am having a devil of a time getting a header, of a defined column area, to display a color.

This pick is from the MediaWiki example:
image

This pick is from my implementation.
image

Also note that I am unable to center the text.

Not sure what I'm doing wrong. Thank you for your help in this matter.

@mbilsky
Copy link

mbilsky commented Jun 10, 2020

I'm not sure why this is happening but it happened for me as well (even in version 2.1).

I fixed it by modifying /assets/stylesheets/foundations.css

There may be a better way but this one has worked for a year plus without any issues. It also seems to work in v2.2.

Changing the .subheader class to:

`.subheader {
line-height: 1.4;
/* color: #6f6f6f;*/
color: #fff;
font-weight: normal;
padding-top: 0.5em;
padding-right: 0.5em;
padding-bottom: 0.5em;
padding-left: 0.5em;
margin-top: 0.2rem;
margin-bottom: 0.5rem;
text-align: center;
background: #517398;

}`

@jmanion711
Copy link
Author

Awesome! Thank you!

@Hutchy68
Copy link
Owner

I fixed it by modifying /assets/stylesheets/foundations.css

ouch, you shouldn't change the actual code because when you update the version it will be lost. Please inspect the code on https://pivot.wikiproject.net and use the System Message MediaWiki:Pivot.css to change styling. That is the safe way.

Homepage code on page. Used tags <h3>

<h3 class="subheader"><span class="fa fa-th fa-lg" style="display:inline;"></span> Responsive Grid</h3>

Note the class="subheader" and then look at https://pivot.wikiproject.net/wiki/MediaWiki:Pivot.css

...
/* Style here are only to highlight functionality of Pivot */

/* make the main page subheaders solid bars */
.subheader {
    background: #517398;
    color: #fff;
    text-align: center;
    padding: .5em;
}
...

This will work for any element you give a class of subheader. Eg. <h2 class="subheader">

@jmanion711
Copy link
Author

jmanion711 commented Jul 25, 2020 via email

@Hutchy68
Copy link
Owner

No problem, closing as answered.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants