开发者

Unordered list in <div> tags

开发者 https://www.devze.com 2023-03-31 10:38 出处:网络
Using unordered list <ul> tags inside <div> creates trouble for me and I am looking for alternatives.

Using unordered list <ul> tags inside <div> creates trouble for me and I am looking for alternatives.

firstpage.para1=   <ul><li>item1<li/><//ul> 
secondpage.para1=开发者_如何学运维   This is simple para,not a list.

Problem is : my list is actually defined in a spring properties file and dynamically resovled in a JSP file using

<div id="somestyle">
<spring:message code={pagename}."para1">
</div>

Since {pagename} can have any value, I cant change code.I cant think of any alternative. I use to divide whole page into left and right columns. Left side has some image and right side has this para1. Should I find alternativ of <div>?


My code detects html tags in messages from properties file and rendering it. I dont have htmlEscape="false" set but it shows list of separate lines. Problem is -incorrect rendering(will not show bullets,wrong font ) as it is being used inside .

Now i have to use to divide whole screen into left and right sides so i cant avoid

<div style="width:60%;float:right;"> 
<p><spring:message code="${pageName}.para.1" htmlEscape="false"/></p>

</div> 

and my message ${pageName}.para.1 is dynamically coming from properties file So it could have html tags or not.


There are several failueres:

first the correct syntax would be:

<spring:message code="${pagename}.para1">

second spring message will escape the output by default, so you need:

<spring:message code="${pagename}.para1" htmlEscape="false">
0

精彩评论

暂无评论...
验证码 换一张
取 消