我想在我的 portlet 中从右到左对齐。在普通的 html 页面中测试它是可以的。但是当我将它放入 Liferay portlet 时,它不是从右到左,而是从左到右显示。这是我的代码:
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
.patientInfo
{
direction:rtl;
border:2px solid;
width: 100%;
}
.titile
{
font-weight:bold;
padding-right:5px;
}
p
{
display:inline;
}
.patientName
{
background-color:#0CF;
direction:rtl;
}
.doctorName
{
background-color:#0CF;
direction:rtl;
}
</style>
</head>
<body>
<div class="patientInfo">
<div class="patientName"><p class="titile">نام بیمار:</p><p> اکبر اسدی</p></div>
<div class="doctorName"><p class="titile">نام دکتر:</p><p>مریم اخیانی</p></div>
</div>
</body>
问题是什么?