1

I'm trying to create a presentation using Slidy, and I want to increase the default font-size.

Slidy presentations have default styling set in this CSS file, which includes the line font-size: 14pt; in the body element.

Here's a minimalist Slidy presentation where I override this font size in a style block in the page head:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
 "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> 
<head> 
  <link rel="stylesheet" type="text/css" media="screen, projection, print" 
   href="http://www.w3.org/Talks/Tools/Slidy2/styles/slidy.css" /> 
  <script src="http://www.w3.org/Talks/Tools/Slidy2/scripts/slidy.js" 
   charset="utf-8" type="text/javascript"></script> 
  <style type="text/css"> 
    body {
      font-size: 128pt;
    }
  </style> 
</head>
<body>
  <div class="slide">
    <p>Some text that ought to be bigger.</p>
  </div>
</body>
</html>

In Internet Explorer, the text is large, as I expected. Firefox and Chrome display small text however. They definitely notice the style block in the page (I can change font-family, or other CSS properties here); they just doesn't seem to want to change the font size.

How should I specify that I want a large default font size?

Richie Cotton
  • 118,240
  • 47
  • 247
  • 360

2 Answers2

3

@f.n174's answer is probably the correct way to fix things for a general xhtml page. Slidy seems to be doing something odd with CSS evaluation, so we need to expoit a trick to change the default font size for all types.

The contents of a slide are contained in an item of class slide, so we can change the font-size for all text tags at once using:

.slide {
  font-size: 128pt;
}

This works in Firefox, Chrome and Internet Explorer.

Richie Cotton
  • 118,240
  • 47
  • 247
  • 360
1

add style="font-size:128px" in your body element as an attribute if this not worked add the code in your <p> element

Farhan
  • 96
  • 2
  • 11
  • Adding the attribute to the body element doesn't change the size. (This is weird, right? Inline styles really ought to override anything else.) Setting the font-size for `

    ` does work (whether I set it as an attribute or in a `

    – Richie Cotton May 24 '14 at 08:55
  • you can write all element names at the begin of the css file and apply font size to them. li,ul,ol,p,etc{font-size:128px} – Farhan May 24 '14 at 13:20