Click to See Complete Forum and Search --> : How to set two variables in one declaration, inline style?
Taurus
09-05-2005, 01:24 PM
How to set two variables in one declaration, inline style:
<body style="font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 11pt;"> and
<body style="background-image: url(http://site/images/picture.jpg); background-repeat: no-repeat; background-position: right bottom">
thanks
conputerguy99
09-05-2005, 01:36 PM
This would be what you're looking for.
<body style="font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 11pt;" background="http://soup-faerie.com/images/background.gif">
Charles
09-05-2005, 01:39 PM
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Style-Type" content="text/css">
<title>Example</title>
<style type="text/css">
body {
background-image: url(http://site/images/picture.jpg);
background-repeat: no-repeat;
background-position: right bottom;
font-family: Arial, Verdana, Helvetica, sans-serif;
font-size: 11pt;
}
</style>
</head>
<body>
<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
</body>
</html>or<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<meta name="Content-Style-Type" content="text/css">
<title>Example</title>
</head>
<body>
<p style="background-image: url(http://site/images/picture.jpg); background-repeat: no-repeat; background-position: right bottom; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 11pt">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.</p>
</body>
</html>
Charles
09-05-2005, 01:41 PM
This would be what you're looking for.
<body style="font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 11pt;" background="http://soup-faerie.com/images/background.gif">That would be invalid HTML. There is no "backgound" attribute anymore.
conputerguy99
09-05-2005, 01:41 PM
replace the background="yadayadayada" with whatever you want, I was just testing with that image.
conputerguy99
09-05-2005, 01:43 PM
I just tested it, and it still works. It may be not completely correct, but it will work in at least IE6 SP2. I haven't tested it on other browsers though.
ray326
09-05-2005, 01:52 PM
I haven't tested it on other browsers though.If you didn't check it with an HTML validator then you don't have a clue whether it's right or not. "It works in browser XYZ" is close to meaningless.
conputerguy99
09-05-2005, 02:01 PM
I just validated it with the http://validator.w3.org/ html validator. It said there was nothing wrong with it.
Charles
09-05-2005, 02:37 PM
Did you, perhaps, validate it as some old antique and outdated version of HTML?
conputerguy99
09-05-2005, 02:50 PM
Nope, I validated it as XHTML 1.0, though maybe that is out of date now...
Charles
09-05-2005, 03:02 PM
XHTML 1.0 transitional as out of date before it was even written, it being nothing but an XML version of HTML 4.01 transitional. And please note, the DTD starts with a note that it is not to be used.
conputerguy99
09-05-2005, 06:17 PM
What is the newest version then?
NogDog
09-05-2005, 07:39 PM
http://www.w3.org/QA/2002/04/valid-dtd-list.html
Charles
09-05-2005, 08:08 PM
http://www.w3.org/QA/2002/04/valid-dtd-list.htmlThat's a list of all possible, W3C DTDs. One should, however, restrict oneself to HTML 4.01 Strict, XHTML 1.0 Strict or XHTML 1.1.
And do keep in mind that newer doesent mean more appropriate. HTML 4.01 Strict is perfect for use on the web. XHTML has other uses.
Taurus
09-06-2005, 05:29 AM
Not clear:
<p style="background-image: url(http://site/images/picture.jpg); background-repeat: no-repeat; background-position: right bottom; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 11pt"> text </p>
this applies style to paragraf only, whereas i meant apply for whole body text.
will this correct:
<body style="background-image: url(http://site/images/picture.jpg); background-repeat: no-repeat; background-position: right bottom; font-family: Arial, Verdana, Helvetica, sans-serif; font-size: 11pt">
....
</body>
muneepenee
09-06-2005, 05:56 AM
1. tu taurus...yes, yu kan appli stile tu <body>
2. if both hav the same stile, it iz redundant, but yu kan hav a list av thangs tu get same style
<style type="text/css">
body{color:black;background-color:#ccffcc;
font-size:13px;line-height:14px;
font-family:sans-serif,helvetica,arial,lucida console}
p,h5,appel{font-size:13px}
</style>
NogDog
09-06-2005, 12:15 PM
1. tu taurus...yes, yu kan appli stile tu <body>
2. if both hav the same stile, it iz redundant, but yu kan hav a list av thangs tu get same style
...
Uh...this is a forum for information exchange, not a social chat room. Could you please attempt to spell words correctly and fully (using a spell-checker if necessary)? This will be especially useful for those members for whom English is not their primary language. Besides, it looks very unprofessional and therefore does not encourage others to take your advice as seriously as it might deserve.