I'm completely new to all of this, so please bear with me. I managed to mash together a basic stylesheet to make the appearance of everything look a certain way. It worked fine in the sugarcane format, but when switched over to sugarcube it doesn't seem to be doing the same. The font size IS affected, as well as the background color. Anything beyond that (text colow, sidebar color, etc.) isn't.
Here's what I'm working with:
[quote]
@import url(
http://fonts.googleapis.com/css?family=Playfair+Display)
.passage { width: 600px !important }
#passages { color: #FFFFFF; !important }
#passages { font-weight: normal }
#passages { font-family:"Playfair Display"; !important }
#passages { font-size: 12px}
body { background-color:
#052C6E }
#sidebar li{ color: #35C0CD; }
#sidebar li{ font-family:"Playfair Display"; !important }
#sidebar li{ font-size: 12px}
#sidebar #title { color: #35C0CD; }
#sidebar #title { font-family:Playfair Display; !important}
#sidebar #title { font-size: 30px}
#sidebar #title:hover { color: #35C0CD; }
a:link { color: #35C0CD; }
What's going wrong? Also, if anyone has any resources specific to sugarcube that would be great.
Comments
- The #sidebar and #title elements are named (id) #ui-bar and #story-title respectively.
- Surgarcane uses <li> tags to break down the sub-parts of the side bar, where-as SugarCube does not.
The easiest way to work out how to reference (using css selectors) the different parts of the screen is to learn to use the Inspect Element feature of your browser.In either Firefox or Chrome: Place the mouse cursor over the item you wish to look at, use the right mouse button to show the context popup menu and select the Inspect Element menu item to open the debugger frame at bottom of your browser window.
Example 1: Sugarcane & Firefox:
a. Place cursor over the text of the Story Title, and open the debugger frame.
b. The second area of the frame shows the path to the currently selected element and will read something like the following:
[quote]html > body > ul#sidebar > li#title.storyElement > span#storyTitle.storyElement
c. The area below that is the source code area and will show you the actual html of the page with the tag representing the Story Title highlighted
d. The area to the right shows the CSS rules being applied to the currently selected element.
e. Looking at either the path or html you can see that the element named #storyTitle.
Example 2: Sugarcube & Firefox:
a. Place cursor over the text of the Story Title, and open the debugger frame.
b. The second area of the frame shows the path to the currently selected element and will read something like the following:
[quote]html > body#body > div#ui-bar > header#title > h1#story-title
c. The area below that is the source code area and will show you the actual html of the page with the tag representing the Story Title highlighted
d. The area to the right shows the CSS rules being applied to the currently selected element.
e. Looking at either the path or html you can see that the element named #story-title
Example 3: Sugarcane & Chrome:
a. Place cursor over the text of the Story Title, and open the debugger frame.
b. The first area is the source code area and will show you the actual html of the page with the tag representing the Story Title highlighted.
c. The area below that shows the path to the currently selected element and will read something like the following:
[quote]html body ul#sidebar li#title.storyElement span#storyTitle.storyElement
d. The area to the right shows the CSS rules being applied to the currently selected element.
e. Looking at either the path or html you can see that the element named #storyTitle.
Example 4: Sugarcube & Chrome:
a. Place cursor over the text of the Story Title, and open the debugger frame.
b. The first area is the source code area and will show you the actual html of the page with the tag representing the Story Title highlighted.
c. The area below that shows the path to the currently selected element and will read something like the following:
[quote]html body#body div#ui-bar header#title h1#story-title
d. The area to the right shows the CSS rules being applied to the currently selected element.
e. Looking at either the path or html you can see that the element named #story-title.
It would take too long to explain all the usages of the debugger, but I suggest you learn at least some of them as it could help with building your story.
I hope this helps a little.
Have you tried reading its documentation? A good primer and reference on CSS might be in order as well.
As to what's going wrong, as noted by greyelf there are differences between SugarCube and the vanilla headers, so some of the selectors are different than what you have. Beyond that, you also have several errors in your CSS and a few instance of smart/curly double-quotes.
Try this:
The note about
#title
is not entirely accurate. Both SugarCube and the vanilla headers have a#title
element, which refers to the container element housing all of the title-related elements (story title, subtitle, author, etc). Additionally, most of the children of the#title
container are the same as well, though their IDs differ (all IDs and classes in SugarCube follow the standard hyphenated format, while the vanilla headers continue to use the old camelCase format).#title
and its children: