(J9J) ...">

Set style for selection only

I have an ond variant that contains both Hebrew and English text. For example:

<select>
    <option value="1">(J9J) AMCKDPR ללא הגבלה IAPPLE</option>
    <option value="2">(B0A) MICROSOFT-עם הגבלה</option>
</select>

      

Since my pages are in Hebrew, I use the direction: rtl on the page. As a result, I am getting displayd options incorrect, for example:

IDIGITAL ללא הגבלה R9K) MICROUSIM)

      

If I change the direction of the integer select to ltr, I get the select arrow on the right - which is bad.

Is it possible to set the style for selection parameters only?

I am using IE8, not firefox.

+3


source to share


1 answer


This cannot be done in CSS, since there is no element to set the rule: you want some of the element's content to option

be processed from left to right, but you cannot use markup for that part. option

No markup is allowed inside an element .

Therefore, the problem should be solved at the character level, using the LEFT RIGHT MARK and RIGHT-TO-LEFT marker, for example

<option value="1">&lrm;(J9J) AMCKDPR &rlm;ללא הגבלה IAPPLE</option>

      

I'm not sure how to apply the idea to the second element option

; perhaps just like this:



<option value="2">&lrm;(B0A) MICROSOFT-עם הגבלה</option>

      

but I can't tell if the result looks ok because I didn't really read Hebrew.

Check out HTML Creation: Right-to-Left Script Processing .

+1


source







All Articles