Opera Mini 和 balckberry 浏览器中不显示 CSS

发布于 2024-08-27 13:34:11 字数 3171 浏览 5 评论 0原文

我是 php 开发人员。我使用 php hawaw.inc 开发了一个移动网站。

我使用页面 sim 为我的页面设置 css,

因为

$myPage->use_simulator("http://".$_SERVER["SERVER_NAME"].":".$_SERVER['SERVER_PORT'].dirname($_SERVER['PHP_SELF'])."/css/style.css")

我的 css 文件是我为表格编写的 css。它在 Windows Mobile 中设置,但在 Opera Mini 和 Black berry 浏览器中未设置。

该页面是

$myPage = new HAW_deck("Login ", HAW_ALIGN_CENTER);
/*$myPage->set_bgcolor('#337fa6');
$myPage->set_background('../images/body_bg.jpg');
$myPage->set_css_class('skin');*/
$myHtmlCode = '<link href="css/style.css" rel="stylesheet" type="text/css" media="handheld" /><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="viewport" content="initial-scale=1.0"/><meta name="viewport" content="user-scalable=false" />';
$myAdblock = new HAW_raw(HAW_HTML, $myHtmlCode);
$myPage->add_raw($myAdblock);

/*$myPage->set_width('50%');
$myPage->set_height('50%');*/
$myPage->use_simulator("http://".$_SERVER["SERVER_NAME"].":".$_SERVER['SERVER_PORT'].dirname($_SERVER['PHP_SELF'])."/css/style.css");
$myForm = new HAW_form($_SERVER['PHP_SELF']); 
$text = new HAW_text("Please enter username & password:"); 
$text1 = new HAW_text("REMcloud", HAW_TEXTFORMAT_BOLD | HAW_TEXTFORMAT_BIG); 
$myImage1 = new HAW_image('','../images/logo.png','REMcloud','');
$myImage1->set_br(1);
$myImage1->set_html_width(200);
$myImage1->set_html_height(100);

$error=new HAW_text($_REQUEST['msg'], HAW_TEXTFORMAT_BOLD);
$error->set_color("#ff0000", "red"); 

$theID = new HAW_input("username", "", "Username",  "*N");
$theID->set_size(4);
$theID->set_maxlength(20);
$text2 = new HAW_text("");
$thePW = new HAW_input("password", "", "Password", "*N");
$thePW->set_size(4);
$thePW->set_maxlength(20);
$thePW->set_type(HAW_INPUT_PASSWORD);
$theSubmission = new HAW_submit("Submit", "submit");
// add the elements in the form
//$myForm->add_text($text1);
$myForm->add_image($myImage1);
//$myForm->add_text($text2);
$myForm->add_text($error);
$myForm->add_text($text2);
$myForm->add_text($text);
$myForm->add_text($text2);
$myForm->add_input($theID);
$myForm->add_text($text2);
$myForm->add_input($thePW);
$myForm->add_text($text2);
$myForm->add_submit($theSubmission);
$myPage->add_form($myForm);
$myPage->create_page();

CSS,

/* HAWHAW skin stylesheet for the hawhaw phone */
body {
  background-color: #FFFFFF;
  text-align: center;
  margin: 0px;
  padding: 0px;
  color: #222222;

}


#skin {
  margin: 0px auto;
  padding: 0px;
  text-align: left;
  width: 280px;
  height: 466px;
  background-image: url(../../images/bg.jpg);
  background-color:#337fa6;
  background-repeat:repeat-x;
}

#display {
  position: relative;
  top: 80px;
 /* left: 43px;*/
  width: 100%;
  height: 85%;
  overflow: auto;
}
TABLE{
width:100%;
padding-left:-10px;
overflow:scroll;
height:20px;
border:none;
font-family:Calibri;
font-size:14px;
}
tr{
height:20px;
}
td{
color:#fff;
border:none;
}
a
{
font-family:Calibri;
font-size:16px;
}

如果有人知道,请告诉我同样的信息,

谢谢

I 'm a php developer. I develope a site for mobile using php hawhaw.inc.

i use the page sim for set the css for my page

as

$myPage->use_simulator("http://".$_SERVER["SERVER_NAME"].":".$_SERVER['SERVER_PORT'].dirname($_SERVER['PHP_SELF'])."/css/style.css")

im my css file i write the css for table. it set in the windows mobile but it's not set in the opera mini and black berry browsers.

The page is

$myPage = new HAW_deck("Login ", HAW_ALIGN_CENTER);
/*$myPage->set_bgcolor('#337fa6');
$myPage->set_background('../images/body_bg.jpg');
$myPage->set_css_class('skin');*/
$myHtmlCode = '<link href="css/style.css" rel="stylesheet" type="text/css" media="handheld" /><link rel="stylesheet" type="text/css" href="css/style.css" /><meta name="viewport" content="initial-scale=1.0"/><meta name="viewport" content="user-scalable=false" />';
$myAdblock = new HAW_raw(HAW_HTML, $myHtmlCode);
$myPage->add_raw($myAdblock);

/*$myPage->set_width('50%');
$myPage->set_height('50%');*/
$myPage->use_simulator("http://".$_SERVER["SERVER_NAME"].":".$_SERVER['SERVER_PORT'].dirname($_SERVER['PHP_SELF'])."/css/style.css");
$myForm = new HAW_form($_SERVER['PHP_SELF']); 
$text = new HAW_text("Please enter username & password:"); 
$text1 = new HAW_text("REMcloud", HAW_TEXTFORMAT_BOLD | HAW_TEXTFORMAT_BIG); 
$myImage1 = new HAW_image('','../images/logo.png','REMcloud','');
$myImage1->set_br(1);
$myImage1->set_html_width(200);
$myImage1->set_html_height(100);

$error=new HAW_text($_REQUEST['msg'], HAW_TEXTFORMAT_BOLD);
$error->set_color("#ff0000", "red"); 

$theID = new HAW_input("username", "", "Username",  "*N");
$theID->set_size(4);
$theID->set_maxlength(20);
$text2 = new HAW_text("");
$thePW = new HAW_input("password", "", "Password", "*N");
$thePW->set_size(4);
$thePW->set_maxlength(20);
$thePW->set_type(HAW_INPUT_PASSWORD);
$theSubmission = new HAW_submit("Submit", "submit");
// add the elements in the form
//$myForm->add_text($text1);
$myForm->add_image($myImage1);
//$myForm->add_text($text2);
$myForm->add_text($error);
$myForm->add_text($text2);
$myForm->add_text($text);
$myForm->add_text($text2);
$myForm->add_input($theID);
$myForm->add_text($text2);
$myForm->add_input($thePW);
$myForm->add_text($text2);
$myForm->add_submit($theSubmission);
$myPage->add_form($myForm);
$myPage->create_page();

the css is

/* HAWHAW skin stylesheet for the hawhaw phone */
body {
  background-color: #FFFFFF;
  text-align: center;
  margin: 0px;
  padding: 0px;
  color: #222222;

}


#skin {
  margin: 0px auto;
  padding: 0px;
  text-align: left;
  width: 280px;
  height: 466px;
  background-image: url(../../images/bg.jpg);
  background-color:#337fa6;
  background-repeat:repeat-x;
}

#display {
  position: relative;
  top: 80px;
 /* left: 43px;*/
  width: 100%;
  height: 85%;
  overflow: auto;
}
TABLE{
width:100%;
padding-left:-10px;
overflow:scroll;
height:20px;
border:none;
font-family:Calibri;
font-size:14px;
}
tr{
height:20px;
}
td{
color:#fff;
border:none;
}
a
{
font-family:Calibri;
font-size:16px;
}

if any one know please advice me for the same

Thanks in advance

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

一笑百媚生 2024-09-03 13:34:11

关于样式表有这样的事情/
媒体类型:文档如何在不同媒体/计算机屏幕上呈现

:media="screen"
对于打印:media="print"
对于手机:media="handheld"

如果你的 css 不起作用,可能它需要一个 media 属性;

<link rel="stylesheet" type="text/css" media="handheld" href="mobile.css" />

当然这只是一个理论;这些是其他媒体类型 w3c-media

如果你的 CSS 工作正常,但你的表格类不会;

给桌子不同的风格,例如;

html :

css : table.blabla {height:20px;}

table.blabla tr td{height:20px;}

there is this thing about stylesheets/
media type: how a document is to be presented on different media/

computer screens : media="screen"
for prints : media="print"
for mobiles : media="handheld"

if your css doesnt work, may be it needs a media attribute;

<link rel="stylesheet" type="text/css" media="handheld" href="mobile.css" />

of course its just a theory; these are other media types w3c-media

if your css work, but your table class wont;

give table different style like;

html : <table class="blabla"><tr><td></td></tr></table>

css : table.blabla{height:20px;}

or table.blabla tr td{height:20px;}

不知在何时 2024-09-03 13:34:11

如果某个页面在 Opera Mini 中看起来不正确,我建议在共享的 Opera Desktop 中进行调试相同的渲染引擎,并提供 Opera Dragonfly 进行调试。

If a page doesn't look correct in Opera Mini I suggest doing the debugging in Opera Desktop which shares the same rendering engine and offers Opera Dragonfly for debugging.

脸赞 2024-09-03 13:34:11

或者您可以使用它来检查 Opera mini

http://www.quirksmode.org/m 的实际兼容性/css.html

Opera mini 在网络标准方面存在很多问题,希望对您有所帮助。

Or you can use this to check actuall compatibility of Opera mini

http://www.quirksmode.org/m/css.html

Opera mini have a lot of problems with web standars, i hope this help you.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文