Hello, I have a couple of questions that I'm hoping you all can help me with.
First, is it possible with CSS to indent the second (and all subsequent) lines of a paragraph, while the first line is not indented (as in a works cited/bibliography)? For example:
Darwin, Charles. On the Origin of Species by Means of Natural Selection, or the Preservation of Favoured Races in the Struggle for Life. 1859. New York: Penguin, 1985.
Wildman, Derek E., et al. âImplications of natural selection in shaping 99.4% nonsynonymous DNA identity between humans and chimpanzees: Enlarging genus Homo.â PNAS 10 June 2003: 7181 â 7188. Proceedings of the National Academy of Sciences. 2003. Nat. Acad. Sci. 6 Apr. 2004 <http://www.pnas.org/cgi/doi/10.1073/pnas.1232172100>.
Here, the lines beginning "Darwin, Charles" and "Wildman, Derek E." would not be indented, but any other lines in the paragraphs should be indented.
Second, is it possible to specifiy an "if/then" statement in CSS for fonts? For example, if a page visitor has Font A installed, then the font-size should be 8px, letter-spacing should be 3px. If the visitor does not have Font A, then use Font B with a font-size of 10px, and letter-spacing of 2px. (Does that make sense? I'm not sure if I'm explaining that well or not.)
Thanks for any asssitance!
Daniel
[Edited to add: in the complete title of Charles Darwin's famous work on evolutionary theory, the word "races" refers to what are commonly known as breeds (as in Border Collies or Beagles in dogs), not races in the human context it's generally used today. Just an FYI, because I didn't want to get any hate mail! ]
Two textual questions
The first can be done with padding-left and text-indent. Text-indent works on the first line of a paragraph...
padding-left : 22px; text-indent : -22px;
so this will put the body of the text 22px in, and the first line in the normal position.
Second question I'm not so sure about.
Two textual questions
what about using a dl list,
possibly dl for title, dt for the main text and dd for the publication details with suitable indents on each, although they may well suit with defaults .... just a thought
The second question I would think is a javascript problem I doubt it's possible with CSS and I think it would be hard either way.
Hugo.
Two textual questions
dJomp, thanks...I'll give it a try and see what happens.
Hugo, thanks also...however, I have no clue what dl lists are! I'm always up for learning something new though, so I will try to find out, and see if it works for me.
As for my second question, I wasn't holding out much hope that it was possible and/or easy to accomplish. Thanks anyway.
Thanks again,
Daniel
Two textual questions
Apologies,
should have said dl=definition list dt=definition term dd=definition description.
They are a bit like unordered lists.
Here is a reasonable explanation on them (if you havn't found one already!)
http://www.maxdesign.com.au/presentation/definition/
Hugo.
Two textual questions
To the second question - yes it is possible with a bit of javascript examination, but the job's a bit tricky.
Find out more by reading thru this DHTML Lab article http://www.webreference.com/dhtml/column30/
Two textual questions
The Javascript example above works, but I think as another newbie, the easiest way I've found to adjust to specific fonts installed is simply to list exact names of fonts in order of preference when you call for your font-family.
Example:
#navbar { font-family: 'Trebuchet MS', 'Lucida Grande', Verdana, Lucida, Geneva, Helvetica, Arial, sans-serif; }
With the single-quotes, it allows you to specify your "pecking-order" if you will of the fonts you wish to check for on your user's computer. In this case, we check for Trebuchet MS first, if it's not there, use Lucida Grande, and if, for some reason, they are both absent, make your way through the typical Verdana font family.
Hope this helps!