Answers.Body: <p>Would inserting a visible-for-production page number</p>
  
  <pre><code>&lt;p&gt;&lt;b&gt;33&lt;/b&gt;&lt;a id="p33"/&gt;California was the first...
  </code></pre>
  
  <p>and removing the bold page num with a regular expression find/replace at completion work for you?</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-09T00:07:46.787Z
Answers.Text: Yes, that could be a cool way to do this. Would you by chance know the regular expression that removes the bold numeral. (I work mostly in Dreamweaver and BBEdit.)
Answers.UserDisplayName: WordBear
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-12-18T02:14:14.243Z
Answers.Text: long time since used BBEdit, but i would start with <b>(\d+)</b>
Answers.UserDisplayName: jorourke
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-07T17:31:32.743Z
Answers.LastActivityDate: 2017-03-07T17:31:32.743Z
Answers.UserDisplayName: jorourke
Answers.Body: <p>Try to use anchor tag as shown below and link these id in your index page.</p>
  
  <p>Example:</p>
  
  <pre><code>&lt;p&gt;&lt;a id=”p33” /&gt;California was the first...
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-03-09T08:53:33.930Z
Answers.LastActivityDate: 2017-03-09T09:30:15.070Z
Answers.LastEditDate: 2017-03-09T09:30:15.070Z
Answers.UserDisplayName: Leon William
Body: <p>Does anyone here know if the CSS property <strong>display: none</strong> is supported by all ereaders?</p>
  
  <p>Let me explain why I'm asking...</p>
  
  <p>I'm turning a 500-page book that's in the public domain into an ebook. The index is 40 pages of fine print. Now that I've finished typing it up, the hard work begins - linking all those entries, all of which are linked to page numbers in the original book.</p>
  
  <p>Then I figured out a way to automate it to some extent. I simply find the place in my text where page 33 begins in the original book and change the following...</p>
  
  <pre><code>&lt;p&gt;California was the first...
  </code></pre>
  
  <p>to this...</p>
  
  <pre><code>&lt;p&gt;&lt;span class="PageNumber"&gt;33&lt;/span&gt;California was the first...
  </code></pre>
  
  <p>I can then give class a PageNumber a style that makes it really stand out, so I can see where all the original pages begin and end.</p>
  
  <p>When I'm finished with my index, I can then change the style to display: none. The page numbers will still be there, serving as anchors, but readers won't see anything at all.</p>
  
  <p>I know that more advanced CSS isn't supported by all ereaders, but I think display: none is an older, more established style. I just wondered if this strategy could create problems.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-04T14:44:28.747Z
Comments.Text: I can't answer this for all devices, but with epub files on my Kobo Glo "display:none" works as expected; anyway, why do you need page numbers in an ebook, that basically don't have "pages"? And why do you need an index when ebooks are searchable?
Comments.UserDisplayName: Sekhemty
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-05T02:11:16.053Z
Comments.Text: Good questions. I seriously considered ditching the index for the reasons you cite. However, this is a classic reference, and I'd kind of like to preserve the index. I even thought about just inserting it as a static index, without links. However, I thought it might be nice to go the extra mile and include links. Also, there are certain subjects that are a little hard to search for.
Comments.UserDisplayName: WordBear
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-05T18:17:07.160Z
Comments.Text: I have to wonder whether using  anchors  (with the A tag) where the id is the page number isn't easier to do. I can't answer your question, but I'd worry about extra space being created within  a span tag.
Comments.UserDisplayName: idiotprogrammer
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-03-05T23:20:45.850Z
Comments.Text: Stupid me, I complete spaced out the ID's, though it was a pretty quick fix. My code now looks like this: <span class="PageNumber" id="236">236</span> Is that what you meant? Also, I was worried that extra spaces between my span and the following text would show up as an extra space in the epub, but that doesn't appear to be happening.
Comments.UserDisplayName: WordBear
Tags: <epub>
Title: CSS: display: none - Is it supported by all devices?
UserDisplayName: WordBear
ThreadText: # CSS: display: none - Is it supported by all devices?
  
  (Asked by: username_0 on 2017-03-04)
  
  Does anyone here know if the CSS property **display: none** is supported by all ereaders?
  
  Let me explain why I'm asking...
  
  I'm turning a 500-page book that's in the public domain into an ebook. The index is 40 pages of fine print. Now that I've finished typing it up, the hard work begins - linking all those entries, all of which are linked to page numbers in the original book.
  
  Then I figured out a way to automate it to some extent. I simply find the place in my text where page 33 begins in the original book and change the following...
  
  ```
  <p>California was the first...
  
  ```
  
  to this...
  
  ```
  <p><span class="PageNumber">33</span>California was the first...
  
  ```
  
  I can then give class a PageNumber a style that makes it really stand out, so I can see where all the original pages begin and end.
  
  When I'm finished with my index, I can then change the style to display: none. The page numbers will still be there, serving as anchors, but readers won't see anything at all.
  
  I know that more advanced CSS isn't supported by all ereaders, but I think display: none is an older, more established style. I just wondered if this strategy could create problems.
  
  **Tags:** epub
  
  > **Comments:**
  > **username_1**: I can't answer this for all devices, but with epub files on my Kobo Glo "display:none" works as expected; anyway, why do you need page numbers in an ebook, that basically don't have "pages"? And why do you need an index when ebooks are searchable?  
  > **username_0**: Good questions. I seriously considered ditching the index for the reasons you cite. However, this is a classic reference, and I'd kind of like to preserve the index. I even thought about just inserting it as a static index, without links. However, I thought it might be nice to go the extra mile and include links. Also, there are certain subjects that are a little hard to search for.  
  > **username_2**: I have to wonder whether using  anchors  (with the A tag) where the id is the page number isn't easier to do. I can't answer your question, but I'd worry about extra space being created within  a span tag.  
  > **username_0**: Stupid me, I complete spaced out the ID's, though it was a pretty quick fix. My code now looks like this: <span class="PageNumber" id="236">236</span> Is that what you meant? Also, I was worried that extra spaces between my span and the following text would show up as an extra space in the epub, but that doesn't appear to be happening.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_3 on 2017-03-07. Score: 2 | Accepted answer
  
  Would inserting a visible-for-production page number
  
  ```
  <p><b>33</b><a id="p33"/>California was the first...
  
  ```
  
  and removing the bold page num with a regular expression find/replace at completion work for you?
  
  > **Comments:**
  > **username_0**: Yes, that could be a cool way to do this. Would you by chance know the regular expression that removes the bold numeral. (I work mostly in Dreamweaver and BBEdit.)  
  > **username_3**: long time since used BBEdit, but i would start with <b>(\d+)</b>  
  
  ---
  
  ### Answer by username_4 on 2017-03-09. Score: 3
  
  Try to use anchor tag as shown below and link these id in your index page.
  
  Example:
  
  ```
  <p><a id=”p33” />California was the first...
  
  ```
  
  
  ---
  
  