acs
acs

Reputation: 31

R markdown ioslides title page format changes

I want to change the appearance of the very first title page that comes up when we knit to html my ioslides. This is the header of a test Rmd file:

    ---
    title: This test
    subtitle: that test
    author: jake
    output: 
       ioslides_presentation:
       incremental: true
       css: myCss4.css
    ---

What I want is to center the title (default is lower left corner) and change the color and font size. I was successful in changing the color and font size but not the location of the text....

This is the custom css I have tried:

    slides > slide.title-slide hgroup h1 {
      font-weight: bold;
      font-size: 24pt;
      color:red;
      bottom: 50%;
    }

I have tried bottom:50%;, top=50% and few other things without success... Title text location does not change. What I code? Or is there a better way instead css?

Upvotes: 3

Views: 4717

Answers (1)

JasonAizkalns
JasonAizkalns

Reputation: 20463

Try using the following:

slides > slide.title-slide hgroup h1 {
  font-weight: bold;
  font-size: 24pt;
  color: red;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
}

Upvotes: 6

Related Questions