473,394 Members | 1,761 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

CSS not rendering text correctly; need help

Hi--

I have been working on some text with CSS, but have not been able to
get it to render correctly. For instance, h1 should be uppercase, and
the blockquote should render as italics. However, both are not.

The text doc is available at www.china-ready.com/colly/chapter04/text1.htm

Thanks in advance,

Following is the CSS:

/* CSS Document */

/* Specify blanket rules for all elements */
body {
margin: 10px;
border: 1px solid #000;
padding:10px;
font: normal 12px Verdana, Arial, Sans-serif;
line-height:150%;
}
/* paragraph styling */
p {
font: 12px verdana,arial,sans-serif;
text-indent:15px;
}
h1, h2 {
letter-spacing:1px;
}
h1 {
font-family: Georgia, Times, serif;
text-transform:uppercase;
}
h2 {
font-family: "Helvetica Neue", Arial, sans-serif;
text-transform:none;
font-style:italic;
}
/* Style the blockquote */
blockquote {
margin: 0 0 0 20px;
line-height:150%;
p {
font: italic small-caps bold 12px/150% verdana,arial,sans-serif
}

Feb 21 '07 #1
4 2960
Scripsit pa************@gmail.com:
www.china-ready.com/colly/chapter04/text1.htm
The markup is OK, though you might just as well use HTML 4.01 Strict (and
wrap the blockquote content inside a block level container). Except that you
don't have any CSS there, directly or indirectly.

To let browsers find your style sheet, say mystyle.css, add the following
into the <headpart:
<link rel="stylesheet" type="text/css" href="mystyle.css">
font: normal 12px Verdana, Arial, Sans-serif;
Please check the FAQ resources of this group (or any _good_ book on CSS)
before digging deeper.
blockquote {
margin: 0 0 0 20px;
line-height:150%;
p {
font: italic small-caps bold 12px/150% verdana,arial,sans-serif
}
You've forgotten the close the blockquote rule with "}".

In future, use the W3C CSS Validator or the WDG CSSCheck to spot syntax
errors in CSS.

--
Jukka K. Korpela ("Yucca")
http://www.cs.tut.fi/~jkorpela/

Feb 21 '07 #2
In article
<11**********************@j27g2000cwj.googlegroups .com>,
"pa************@gmail.com" <pa************@gmail.comwrote:
Hi--

I have been working on some text with CSS, but have not been able to
get it to render correctly. For instance, h1 should be uppercase, and
the blockquote should render as italics. However, both are not.

The text doc is available at www.china-ready.com/colly/chapter04/text1.htm

Thanks in advance,

Following is the CSS:
So why did you not apply the css in the url? As it happens, when
you apply your css, the <h1is rendered as all caps (in Firefox
at least). If you use

font-style: italic;

in the blockquote instructions, you will get italics.

You are making a few mistakes otherwise. For instance, do not use
px for font-size, easiest for you is this: use 100% for body and
go from there.

Forget about line height till you read up on it. Just leave it
out.

--
dorayme
Feb 21 '07 #3
On Feb 21, 3:18 pm, "Jukka K. Korpela" <jkorp...@cs.tut.fiwrote:
Scripsit paul.denlin...@gmail.com:
www.china-ready.com/colly/chapter04/text1.htm

The markup is OK, though you might just as well use HTML 4.01 Strict (and
wrap the blockquote content inside a block level container). Except that you
don't have any CSS there, directly or indirectly.

To let browsers find your style sheet, say mystyle.css, add the following
into the <headpart:
<link rel="stylesheet" type="text/css" href="mystyle.css">
font: normal 12px Verdana, Arial, Sans-serif;

Please check the FAQ resources of this group (or any _good_ book on CSS)
before digging deeper.
blockquote {
margin: 0 0 0 20px;
line-height:150%;
p {
font: italic small-caps bold 12px/150% verdana,arial,sans-serif
}

You've forgotten the close the blockquote rule with "}".

In future, use the W3C CSS Validator or the WDG CSSCheck to spot syntax
errors in CSS.

--
Jukka K. Korpela ("Yucca")http://www.cs.tut.fi/~jkorpela/
Thanks for catching this mistake; I thought I had linked up the css
and the html docs, but somehow the link got broken. I have relinked
them, and uploaded the document, and will run it thru CSS Check.

Thank you.

Feb 22 '07 #4
Jukka K. Korpela wrote:
Scripsit pa************@gmail.com:
>www.china-ready.com/colly/chapter04/text1.htm
blockquote {
margin: 0 0 0 20px;
line-height:150%;
p {
font: italic small-caps bold 12px/150% verdana,arial,sans-serif
}

You've forgotten the close the blockquote rule with "}".
Actually, it's more like he has an extraneous "p {".
Same effect, different solution.

--
John
Feb 22 '07 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: David Opstad | last post by:
I have a question about text rendering I'm hoping someone here can answer. Is there a way of doing linguistically correct rendering of Unicode strings in Python? In simple cases like Latin or...
14
by: Bill Thoralina | last post by:
Hi, I created an XHTML page, but for some reason it isn't rendering on my browser. It is showing up as code. Any suggestions? Thanks.
3
by: David Whitney | last post by:
All: I have a control that renders a table. As the table is rendered, each row in the table is constructed by creating a run-time (dynamic) object that is derived from an HtmlTableRow. The row...
2
by: Mike Speak | last post by:
I have a user control that I want to use to render 4 menu items (retrieved from db) on the top of each of my asp.net pages. The user control defines a table, with one TR and one TD. Within the...
1
by: Marco | last post by:
I must use text in Opengl, Python This text is for architecture design then I need to use AutoCad fonts (extension .shx). I have two troubles: I don't find a guide, a good program, something...
0
by: Juan R. | last post by:
Since the idea of encoding mathematics using MathML is being very far from popular due to a number of factors -expensive tools, bad accesibility of generated code, unusual verbosity, lack of...
5
by: paul.hester | last post by:
Hi all, I have a custom control with an overridden Render method. Inside this method I'm rendering each control in its collection using their RenderControl method. However, I'm running into a...
12
by: Boris Borcic | last post by:
Hello, I am trying to use UI Automation to drive an MS Windows app (with pywinauto). I need to scrape the app's window contents and use some form of OCR to get at the texts (pywinauto can't...
3
by: SAL | last post by:
Hello, I did google this issue and found some stuff related to BrowserCaps section of either web.config or machine.config but it didn't work. It seems that most pages in my webapp are okay but a...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.