# Sharing common custom CSS

**URL:** <https://pressbooks.community/t/sharing-common-custom-css/2564>\
**Category:** Network Manager Resources\
**Created:** [November 14, 2023, 2:16pm UTC](https://pressbooks.community/t/sharing-common-custom-css/2564 "2023-11-14T14:16:13Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![allisonbrown](https://pressbooks.community/user_avatar/pressbooks.community/allisonbrown/32/905_2.png) [@allisonbrown](https://pressbooks.community/u/allisonbrown)\
**Post date:** [November 14, 2023, 2:16pm UTC](https://pressbooks.community/t/sharing-common-custom-css/2564/1 "2023-11-14T14:16:13Z")

</div>

Would anyone be interested in compiling/sharing custom CSS they use regularly? I have a few alterations I make on most PDF exports.

I’ve been meaning to compile them for my own uses, but I thought possibly others have similar alterations, and we could use the opportunity to swap, share, etc. I’m imagining like an index-type resource with sample code that can be copied easily.

Here are some examples of common changes I make to the basic themes for PDF exports:

- reducing padding on textbox headers to keep page count lower for heavy users of textboxes
- allowing page breaks in tables that are very large, so as not to cause a blank page prior
- spacing adjustments for equations generated from LaTeX
- setting “float on the next page” rules for images

Sound fun? Or does this exist already and I’m just reinventing the wheel?

---

<div class="post-metadata">

**Author:** ![hughmcguire](https://pressbooks.community/user_avatar/pressbooks.community/hughmcguire/32/19_2.png) [@hughmcguire](https://pressbooks.community/u/hughmcguire)\
**Post date:** [November 14, 2023, 3:13pm UTC](https://pressbooks.community/t/sharing-common-custom-css/2564/2 "2023-11-14T15:13:33Z")

</div>

@allisonbrown allison these are useful … they are probably things we might consider (at some point in the future) including as options in the interface so you could just select them rather than dropping in CSS. So I’d say yes please, share the CSS.

Here’s mine (from the old days!), I include a float-top setting on images so that you don’t get blank pages. Would probably do same for textboxes/tables etc if using them. CSS is something like this, but it’s been a while!

```auto
.wp-caption {
  height: auto;
  max-width: 100%;
  margin: 1em 0;
  float: column-top;
  column-span: 2;
}

```

---

<div class="post-metadata">

**Author:** ![elizabeth.kelly](https://pressbooks.community/letter_avatar_proxy/v4/letter/e/9f8e36/32.png) [@elizabeth.kelly](https://pressbooks.community/u/elizabeth.kelly)\
**Post date:** [November 20, 2023, 2:35pm UTC](https://pressbooks.community/t/sharing-common-custom-css/2564/3 "2023-11-20T14:35:22Z")

</div>

I’m interested! Here are mine (so far):

```auto
/* makes the text for the previous/next buttons in the webbook bigger */
.nav-reading __next a, .nav-reading__ previous a {
    font-size: .99rem !important;
}

```

```auto
/* disables hyphenated words */
* {
  adobe-hyphenate: none !important;
  -webkit-hyphens: none !important;
  -moz-hyphens: none !important;
  -ms-hyphens: none !important;
  -epub-hyphens: none !important;
  hyphens: none !important;
}

```

---

<div class="post-metadata">

**Author:** ![shuchi](https://pressbooks.community/user_avatar/pressbooks.community/shuchi/32/1522_2.png) [@shuchi](https://pressbooks.community/u/shuchi)\
**Post date:** [December 20, 2023, 8:58pm UTC](https://pressbooks.community/t/sharing-common-custom-css/2564/4 "2023-12-20T20:58:27Z")

</div>

Hello Allison,

This would be really helpful! We are using the Jacobs theme and are running into several formatting issues in the PDF.

- We use many boxes, so reducing the header padding would definitely be helpful for us! Also, we have an icon in the textbox header, and including the icon messes up the alignment and spacing, so we had to disable it in the PDF version, although the online version has the icon.
- We are also running into some issues with multi-level lists and spacing.

We are muddling our way through these, but not sure we are doing it the right way! Any code available for these would be super helpful. And as we develop that works as it should, would be happy to share!

Thank you.  
Shuchi
