Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / February 2007



Tip: Looking for answers? Try searching our database.

CSS not rendering text correctly; need help

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
paul.denlinger@gmail.com - 21 Feb 2007 22:35 GMT
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
}
Jukka K. Korpela - 21 Feb 2007 23:18 GMT
Scripsit paul.denlinger@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 <head> part:
<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.

Signature

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

paul.denlinger@gmail.com - 22 Feb 2007 00:29 GMT
> Scripsit paul.denlin...@gmail.com:
>
[quoted text clipped - 27 lines]
> --
> 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.
John Hosking - 22 Feb 2007 01:15 GMT
> Scripsit paul.denlinger@gmail.com:
>
[quoted text clipped - 7 lines]
>
> You've forgotten the close the blockquote rule with "}".

Actually, it's more like he has an extraneous "p {".
Same effect, different solution.

Signature

John

dorayme - 21 Feb 2007 23:24 GMT
In article
<1172097351.918732.299670@j27g2000cwj.googlegroups.com>,

> Hi--
>
[quoted text clipped - 7 lines]
>
> Following is the CSS:

So why did you not apply the css in the url? As it happens, when
you apply your css, the <h1> is 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.

Signature

dorayme

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.