Register Guidelines E-Books Search Today's Posts Mark Forums Read

Go Back   MobileRead Forums > E-Book Formats > ePub

Notices

Reply
 
Thread Tools Search this Thread
Old 11-03-2014, 10:52 AM   #1
rosshalde
Zealot
rosshalde began at the beginning.
 
Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
problem linking css to html

Hello,
I am trying to go through Pablo's pdf that I found here "quick and dirty epub tutorial. I am a total novice, so any help is appreciated.

First few steps, no problem, but I can't get my css to work on the html document.
Can someone help me see what I did wrong here?
Here is my css
p{
text-indent: 2em;
text-align: justify;
font-size: 1em;
margin-top:0;
margin-bottom:0;
}
h1{
font-size: 2em;
text-decoration: underline;
text-align: center;
font-weight: bold;
text-indent:0;
}
h2{
font-size: 2em;
font-style: italic;
font-weight: normal;
text-align: left;
text-indent:0;
}

Here is my html file
<html>
<head>
<meta name=“Title” content=“HTML micro tutorial”/>
<meta name=“Author” content=“Pablo”/>
<link rel=“stylesheet” type=“text/css” href=“style.css”/>
</head>
<body>



<h1>This is a level 1 title</h>
<h2>1 - A level 2 title</h2>
<p>First paragraph - I love the way that making a book has become a giant pain in the rear end for me. I wish it were not so complicated.</p>
<p>Second paragraph</p>
<h2>2 - Another level 2 title</h2>
<p>First paragraph</p>
<p>etc...</p>
</body>
</html>
rosshalde is offline   Reply With Quote
Old 11-03-2014, 12:16 PM   #2
rosshalde
Zealot
rosshalde began at the beginning.
 
Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
Got it to work.

I had
<link rel=“stylesheet” type=“text/css” href=“style.css” />
but needed
<link rel="stylesheet" type="text/css" href="style.css" />
The "smart" quotes button was checked and apparently, that was the issue.
Are there other issues like this that I should be aware of now before I move forward?
rosshalde is offline   Reply With Quote
Advert
Old 11-03-2014, 01:06 PM   #3
Pablo
Guru
Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.Pablo ought to be getting tired of karma fortunes by now.
 
Pablo's Avatar
 
Posts: 970
Karma: 4999999
Join Date: Mar 2009
Location: Rosario, Argentina
Device: SONY PRS-505, PRS-T2
Quote:
Originally Posted by rosshalde View Post
Got it to work.

I had
<link rel=“stylesheet” type=“text/css” href=“style.css” />
but needed
<link rel="stylesheet" type="text/css" href="style.css" />
The "smart" quotes button was checked and apparently, that was the issue.
Are there other issues like this that I should be aware of now before I move forward?
Make sure you use a plain text editor, like notepad, to avoid problems like these.

Filenames can be case-sensitive in some systems, so be careful with that, too.

Good luck and have fun!
Pablo is offline   Reply With Quote
Old 11-03-2014, 03:44 PM   #4
rosshalde
Zealot
rosshalde began at the beginning.
 
Posts: 142
Karma: 10
Join Date: Jun 2014
Device: nook
I was using text edit on my mac. I used the default settings.
rosshalde is offline   Reply With Quote
Old 11-03-2014, 07:23 PM   #5
theducks
Well trained by Cats
theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.theducks ought to be getting tired of karma fortunes by now.
 
theducks's Avatar
 
Posts: 29,659
Karma: 54369090
Join Date: Aug 2009
Location: The Central Coast of California
Device: Kobo Libra2,Kobo Aura2v1, K4NT(Fixed: New Bat.), Galaxy Tab A
Quote:
Originally Posted by rosshalde View Post
I was using text edit on my mac. I used the default settings.
What has the setting of a 3rd party editor to do with what you type?


Filename.HTML
is different from
filename.html

EPUB is case sensitive. Every letter in a filename must exactly match its usage

Both the above are valid
You can use either as long as you use the EXACT same ever place.

I seriously recommend that you avoid using both (2 different files) in the same book. Just too confusing to debug.
theducks is offline   Reply With Quote
Advert
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Minor HTML/CSS problem AlexBell Marvin 3 01-25-2014 10:46 PM
Fighting CSS Problem in HTML to MOBI Conversion boywondr16 Conversion 6 04-03-2013 09:51 AM
html css question holdit Sigil 3 12-17-2012 11:55 AM
html & css to fight the Nook centering problem Dia435 ePub 2 10-28-2012 07:21 PM
iLiad Linking to other files from HTML doc? marussell01 iRex Developer's Corner 2 01-14-2008 08:45 PM


All times are GMT -4. The time now is 11:31 PM.


MobileRead.com is a privately owned, operated and funded community.