PDA

View Full Version : CSS & AMS 5...


Intrigued
09-22-2004, 02:32 PM
Any comments as to using CSS (Cascading Style Sheets) in AMS 5 would be appreciated. Such as, pluses and minuses of using such in AMS 5.

I just (finally got around to such) went live with CSS via two examples; one via Internal use and the second via link rel'ing

Or, is it time to move to XML?

Thank you in advance. I really appreciate the brainstorming sessions here!

Very Sincerely,

Intrigued
09-22-2004, 08:49 PM
Ah! That many dabble with CSS? :huh

Well, for those that have an interest or have had at some point, I found that CSS (and Styles as a whole) seem to be pretty easy to code and then implement. At least so far the sailing has been pretty smooth.

I like that you can have much more control over your HTML file's content in say a Web Object (or web page for that matter).

Here is a sample CSS file I just did (remember, I am new, this is very ugly)

CSS file code to give a visual to my post:

img {
color:green;
border:dotted;
}
p {
color:Red;
font-size:200%;
}
h1 {font:"serif";font-weight:150%;background-image:url(C:\Documents and Settings\replacewithcurrentuser\Desktop\mccard.jpg )}

Here is the HTML:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
<HEAD>

<TITLE> TEST </TITLE>

<link rel="stylesheet" type="text/css" href="base.css" />

<p> A Paragraph! </p>
<br>
<br>
<h1>&nbsp;<!-- Contains a Image. SEE: the file base.css --></h1>

</HEAD>

<BODY>

<img src="C:\Documents and Settings\replacewithcurrentuser\Desktop\visa_logo. jpg" />
<img src="C:\Documents and Settings\replacewithcurrentuser\Desktop\mccard.jpg" />

</BODY>
</HTML>

What happens is I have all four files (including the two images) on my computer's Desktop (or pick a directory on/off-line). The base.css is an external file thus and I can either reference it from its location (and thus apply the Styles to any web page I choose) or I can in-line (Style code right into the HTML file). This is an explanation for those not in the know. If you are in the know and find a mistake... please let me know!

Sincerely,

JimS
09-23-2004, 12:22 AM
Intrigued,
I’m by no means an expert on CSS or even HTML for that matter. I do however see a couple of lines of code that have the possibility of proving problematic.

h1 {font:"serif";font-weight:150%;background-image:url(C:\Documents and Settings\replacewithcurrentuser\Desktop\mccard.jpg )}

and

<img src="C:\Documents and Settings\replacewithcurrentuser\Desktop\visa_logo. jpg" />
<img src="C:\Documents and Settings\replacewithcurrentuser\Desktop\mccard.jpg" />

First, you have ‘spaces’ in your path. Each of these spaces should be replaced with %20

Second you are using absolute paths, rather than relative paths. Your pictures will show up fine on your machine, but they won’t show up if you upload it to a webserver.

Intrigued
09-23-2004, 09:35 AM
The server side path I understood (this was just a sample on my hardrive), but, the %20 was something I was unaware of!

Thanks JimS!

JimS
09-23-2004, 02:29 PM
:)

.