样式表问题 [英] Style Sheet Question

查看:47
本文介绍了样式表问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



大家好,


我可以使用样式表制作页面,没问题。但是,如果我发了一封电子邮件并将其发送到我的列表,雅虎& Hotmail完全

忽略样式标签。虽然它在网景中看起来不错.....


问题:我已经尝试过连接&嵌入样式标签没有运气。

如何在线使用它们?我已经读过如果你想让它们在大多数电子邮件客户端工作的话,内联样式表是

的方式.......


比方说我在我的样式表中定义了以下ID:

如何使用它们inlinwe,我不确定语法等等:


#idDivBack {

仓位:绝对;

顶部:168px;

剩余:150px;

身高:40px;

宽度:100%;

背景色:#D0A375; / *#9999CC; * /

border-style:none;

border-width:medium;

font-style:normal;

font-variant:normal;

font-weight:bold;

line-height:100%;

font-size:27pt;

font-family:Times,serif;

color:#CC9B6A; / *#8888DD; * /

填充:5px;

text-align:right;

}

#idDivTitle1a {

职位:绝对;

顶部:143px;

剩余:165px;

身高:100px ;

font-style:italic;

font-variant:normal;

font-weight:bold;

line-height:100%;

font-size:38pt;

font-family:Verdana,sans-serif;

颜色: #D0A375; / *#00CC99; * /

background-color:透明;

filter:shadow(color =#000000,direction = 135);

}

#idDivTitle1b {

职位:绝对;

顶部:140px;

左:162px;

身高:100px;

font-style:italic;

font-variant:normal;

font-weight :粗体;

行高:100%;

字体大小:38pt;

font-family:Verdana,sans-serif;

颜色:#663300; / *蓝色; * /

背景颜色:透明;

}


#idDivTitle2a {

位置:绝对;

左:180px;

顶部:193px;

身高:40px;

font-style:normal;

font-variant:normal;

font-weight:bold;

line-height:100%;

字体大小:24pt;

font-family:Verdana,sans-serif;

color:silver; / * silver; * /

background-color:transparent;

}

#idDivTitle2b {

position:绝对;

剩余:190px;

顶部:200px;

身高:40px;

font-style:正常;

font-variant:normal;

font-weight:bold;

line-height:100%;

font-size:24pt;

font-family:Verdana,sans-serif;

color:#990000; / *海军; * /

背景颜色:透明;

}

.BodyArea {

职位:绝对的;

背景色:#E0E0E0; / * #AFFEEE; * /

颜色:黑色;

顶部:265px;

宽度:680px;

left:150px;

填充:5px;

border:中等纯银; / *#00CC99; * /

保证金底部:1cm;

}


@media print {

#idDivBack {visibility:hidden; }

#idDivTitle1a {visibility:hidden; }

#idDivTitle1b {visibility:hidden; }

#idDivTitle2a {visibility:hidden; }

.BodyArea {visibility:hidden; }


#idDivTitle2b {

职位:绝对;

剩余:150px;

top: 140px;

身高:30px;

font-style:normal;

font-variant:normal;

font-weight:bold;

line-height:100%;

font-size:24pt;

font-family:Verdana,sans -serif;

颜色:#990000; / *海军; * /

背景颜色:透明;

}

}

谢谢,


亚瑟

解决方案

am **** @ iwc.net 写道:

我可以使用样式表制作页面,没问题。但是,如果我发送电子邮件并将其发送到我的列表,雅虎& Hotmail完全忽略了样式标签。


HTML电子邮件不好。

带有格式化的HTML电子邮件我的CSS除了样式*属性*非常好支持



避免两者。

例如我说我的样式表中定义了以下ID,
我如何使用它们inlinwe,我不确定语法等等:




更改:

id =" idDivBack"

to

style =" position:absolute; top:168px; etc etc etc"。

等等。

-

David Dorward< http://blog.dorward.me.uk/> < http://dorward.me.uk/>

Home是〜/ .bashrc的地方


am **** @ iwc.net 写道:

我可以使用样式表制作页面,没问题。但是,如果我发送电子邮件并将其发送到我的列表,雅虎& Hotmail完全忽略了样式标签。虽然它在网景中看起来很好.....

问题:我已经尝试过连接&嵌入样式标签没有运气。
如何在线使用它们?我已经读过如果你想让它们在大多数电子邮件客户端工作,那么内联样式表就是你要走的路.......




如果您希望您的电子邮件能够在大多数客户中使用,最好使用简单的

文本,如果内容绝对是
,请附上指向网页的链接
需要HTML。也就是说,如果你决定使用HTML电子邮件,请注意

webmail系统通常会忽略任何样式表,以免损坏他们的界面(当然有一个但是很聪明的样式表

重写他们可以绕过这个,但他们太懒了)。相反

你应该将所有CSS放在元素的''style'属性中

你希望格式化。


-

萨法拉(Stephen Morley)
http: //www.safalra.com/hypertext/


>相反,你应该把所有的CSS放在你想要格式化的元素

的''style''属性中。



我从不在我的HTML中使用样式表邮件。相反,我使用普通的老式HTML(字体标签等)。


所以,我想知道:什么是内联CSS或HTML的最佳解决方案?

Niek

BTW:这是我在这个新闻组中的第一篇文章。我是来自荷兰蒂尔堡的网站建设者,为 www.sebastian.nl 工作。



Hi All,

I can make a page using a style sheet, no problem there. However, if I
make an email and send it out to my list, Yahoo & Hotmail totally
ignore the style tags. It looks fine in Netscape though.....

Question: I''ve tried linking & embedding the style tags with no luck.
How can I use them inline? I''ve read that inline style sheets is the
way to go if you want them to work in most email clients.......

Say for example I have the following ID''s defined in my style sheet,
how can I use them inlinwe, I''m not sure of the syntax and such:

#idDivBack {
position: absolute;
top: 168px;
left: 150px;
height: 40px;
width: 100%;
background-color: #D0A375; /*#9999CC;*/
border-style: none;
border-width: medium;
font-style: normal;
font-variant: normal;
font-weight: bold;
line-height: 100%;
font-size: 27pt;
font-family: Times, serif;
color: #CC9B6A; /*#8888DD;*/
padding: 5px;
text-align: right;
}
#idDivTitle1a {
position: absolute;
top: 143px;
left: 165px;
height: 100px;
font-style: italic;
font-variant: normal;
font-weight: bold;
line-height: 100%;
font-size: 38pt;
font-family: Verdana, sans-serif;
color: #D0A375; /*#00CC99;*/
background-color: transparent;
filter: shadow(color=#000000, direction=135);
}
#idDivTitle1b {
position: absolute;
top: 140px;
left: 162px;
height: 100px;
font-style: italic;
font-variant: normal;
font-weight: bold;
line-height: 100%;
font-size: 38pt;
font-family: Verdana, sans-serif;
color: #663300; /*blue;*/
background-color: transparent;
}

#idDivTitle2a {
position: absolute;
left: 180px;
top: 193px;
height: 40px;
font-style: normal;
font-variant: normal;
font-weight: bold;
line-height: 100%;
font-size: 24pt;
font-family: Verdana, sans-serif;
color: silver; /*silver;*/
background-color: transparent;
}
#idDivTitle2b {
position: absolute;
left: 190px;
top: 200px;
height: 40px;
font-style: normal;
font-variant: normal;
font-weight: bold;
line-height: 100%;
font-size: 24pt;
font-family: Verdana, sans-serif;
color: #990000; /*navy;*/
background-color: transparent;
}
.BodyArea {
position: absolute;
background-color: #E0E0E0; /*#AAFFEE;*/
color: black;
top: 265px;
width: 680px;
left: 150px;
padding: 5px;
border: medium solid silver; /*#00CC99;*/
margin-bottom: 1cm;
}

@media print {
#idDivBack { visibility: hidden; }
#idDivTitle1a { visibility: hidden; }
#idDivTitle1b { visibility: hidden; }
#idDivTitle2a { visibility: hidden; }
.BodyArea { visibility: hidden; }

#idDivTitle2b {
position: absolute;
left: 150px;
top: 140px;
height: 30px;
font-style: normal;
font-variant: normal;
font-weight: bold;
line-height: 100%;
font-size: 24pt;
font-family: Verdana, sans-serif;
color: #990000; /*navy;*/
background-color: transparent;
}
}
Thanks,

Arthur

解决方案

am****@iwc.net wrote:

I can make a page using a style sheet, no problem there. However, if I
make an email and send it out to my list, Yahoo & Hotmail totally
ignore the style tags.
HTML email is bad.
HTML email with formatting my CSS other then style *attributes* is badly
supported.

Avoid both.
Say for example I have the following ID''s defined in my style sheet,
how can I use them inlinwe, I''m not sure of the syntax and such:



Change:
id="idDivBack"
to
style="position: absolute;top: 168px;etc etc etc".
and so on.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is


am****@iwc.net wrote:

I can make a page using a style sheet, no problem there. However, if I
make an email and send it out to my list, Yahoo & Hotmail totally
ignore the style tags. It looks fine in Netscape though.....

Question: I''ve tried linking & embedding the style tags with no luck.
How can I use them inline? I''ve read that inline style sheets is the
way to go if you want them to work in most email clients.......



If you want your e-mail to work in most clients, it''s best to use plain
text, and include a link to webpage if there''s content that absolutely
requires HTML. That said, if you''re determined to use HTML e-mail, note
that webmail systems will generally ignore any stylesheet so as not to
ruin their interface (of course with a but of clever stylesheet
rewriting they could get around this, but they''re too lazy). Instead
you should put all the CSS within the ''style'' attribute of the element
you want formatted.

--
Safalra (Stephen Morley)
http://www.safalra.com/hypertext/


> Instead you should put all the CSS within the ''style'' attribute of the element

you want formatted.


I never use stylsheets in my HTML-mailings. Instead, I use plain old-fashioned HTML (font-tags and such).

So, I wonder: what is the best solution inline CSS or HTML?
Niek
BTW: This is my first post in this newsgroup. I am a sitebuilder from Tilburg, The Netherlands working for www.sebastian.nl


这篇关于样式表问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆