Register Guidelines E-Books Today's Posts Search

Go Back   MobileRead Forums > E-Book Software > Sigil

Notices

Reply
 
Thread Tools Search this Thread
Old 12-06-2010, 08:42 PM   #1
Ephraim
Enthusiast
Ephraim began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Nov 2010
Device: ibooks
Linking Stylesheet with Text

Hello, I'm trying to create a new ePub and I don't understand the linking the stylesheet to the text. I have pasted over the text I want to make my first chapter but I don't see the style sheet. How do I create one? Thanks in advance.
Ephraim is offline   Reply With Quote
Old 12-06-2010, 10:31 PM   #2
Danger
Evangelist
Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.Danger ought to be getting tired of karma fortunes by now.
 
Danger's Avatar
 
Posts: 490
Karma: 1665031
Join Date: Nov 2010
Location: Vancouver Island, Nanaimo
Device: K2 (retired), Kobo Touch (passed to the wife), KGlo, Galaxy TabPro
Well to try and keep this simple:

Open Sigil, at the left hand side you will see a bunch of folder icons. RIGHT click on Styles, select "Add New Item." This will create a BLANK stylesheet. DOUBLE LEFT click to open that up and paste the following from the code box below:

Code:
@namespace h "http://www.w3.org/1999/xhtml";

/* defines page margins for all display pages: top right bottom left*/
@page { margin: 15px 0px 0px 0px; }

/* heading tag one, I use this for book titles */
h1 {
text-align: center;
font-size: 1.5em;
padding: 0;
margin: 5px 0 0 0;
}

/* heading tag two, I use this one for chapter titles */
h2 {
text-align: left;
page-break-before: always;
font-size: 1.2em;
padding: 0;
margin: 10px 0 0 0;
}

/* your paragraph tag, wrap your paragraphs with it */
p {
text-indent: 25px;
text-align: justify;
padding: 0;
margin: 6px 0 0 0;
}
Now go to the page labled Section0001.html, select CODE VIEW and paste in the following UNDER <title></title> and ABOVE </head>:
Code:
  <link href="../Styles/style0001.css" rel="stylesheet" type="text/css" />
That about covers the basics of linking a style sheet. You MUST do that second part with every .html or .xhtml page you create.
Danger is offline   Reply With Quote
Advert
Old 12-07-2010, 05:38 PM   #3
Ephraim
Enthusiast
Ephraim began at the beginning.
 
Posts: 29
Karma: 10
Join Date: Nov 2010
Device: ibooks
Perfect! It worked great..Thanks so much.
Ephraim is offline   Reply With Quote
Reply


Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Stylesheet examples? Skitzman69 Sigil 15 09-24-2010 08:24 PM
ePub margins : @page vs stylesheet.css Agama Calibre 1 08-16-2010 04:37 PM
How to maintain a global CSS stylesheet amoroso Sigil 7 07-18-2010 08:37 PM
Where is the stylesheet.css? roger64 Sigil 4 03-23-2010 02:12 PM
Skinning Gmail with a Custom Stylesheet Colin Dunstan Lounge 0 02-14-2005 08:20 AM


All times are GMT -4. The time now is 04:53 AM.


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