9 replies [Last post]
abtin
Offline
newbie
Last seen: 10 years 24 weeks ago
Joined: 2008-12-01
Posts: 5
Points: 0

Hello people

Im developing my application in asp.net 2. I have dropdownlist which im using it in a div with direction rtf, the dropdownlist items in IE7 and firefox 3 are aligned in right, though in safari it is aligned in left, and what ever css code i tried it didnt changed,
even i tried
.dropdownlist
{
direction: rtf;
text-align: right;
}
and then i tried
option
{
direction: rtf;
text-align: right;
}
yet havnt worked in Safari browser,
any idea how can i make is work

thanks in advance

Stomme poes
Stomme poes's picture
Offline
Elder
Netherlands
Last seen: 7 years 29 weeks ago
Netherlands
Timezone: GMT+2
Joined: 2008-02-04
Posts: 1854
Points: 378

Not sure what you got

Not sure what you got working in ANY browser.

Direction: rtf does not exist.

Did you mean "rtl"?

Is this Arabic or Hebrew script?

Direction has nothing to do with text-align, which Safari supports (meaning, there should be no problem aligning your text to the right in Safari). Safari also supports direction too, but for the text-align have you tried it alone?

thing {
text-align: right;
}
and working in all browsers?

I'm no expert, but I fake one on teh Internets

abtin
Offline
newbie
Last seen: 10 years 24 weeks ago
Joined: 2008-12-01
Posts: 5
Points: 0

Oh sorry, yes i ment

Oh sorry, yes i ment rtl,

Everything text-align property is working fine my safari browser, except the element in my dropdownlist (select html element), no matter what i wrote in my css the dropdownlist items are align to left, although in both IE and firefox its working fine.
first i used text-align it didnt worked, then i used direction property just to be sure..

Stomme poes
Stomme poes's picture
Offline
Elder
Netherlands
Last seen: 7 years 29 weeks ago
Netherlands
Timezone: GMT+2
Joined: 2008-02-04
Posts: 1854
Points: 378

Well, since I don't know of

Well, since I don't know of any Safari bugs with this, you might need to post all the code (css and the HTML of the menu and some surrounding code). It's unlikely but possible that something is overriding your text-align: right in Safari (though Safari generally works like other modern browsers). Another possibility is that a silent bug is letting FF and IE align to the right while Safari does the right thing.

                                                      .seod ltr tahw si sihT

I'm no expert, but I fake one on teh Internets

abtin
Offline
newbie
Last seen: 10 years 24 weeks ago
Joined: 2008-12-01
Posts: 5
Points: 0

<div style="text-align:

    <div style="text-align: right; direction: rtl;">
 
        <asp:DropDownList ID="DropDownList1" runat="server" Width="300px">
            <asp:ListItem Text="ستسیت" Value="sdsd"></asp:ListItem>
            <asp:ListItem Text="شسیشی" Value="asd"></asp:ListItem>
        </asp:DropDownList>
        <br />
        <select dir="rtl" style="width: 300px; " >
            <option>سشیشی</option>
            <option>یشتخش</option>
        </select>
    </div>

this is the sample of the code
Im using safari 3.1.2 from vista home

Stomme poes
Stomme poes's picture
Offline
Elder
Netherlands
Last seen: 7 years 29 weeks ago
Netherlands
Timezone: GMT+2
Joined: 2008-02-04
Posts: 1854
Points: 378

Oh no no, can you post what

Oh no no, can you post what the BROWSER sees?

View Page Source under View most likely... post that! The browsers aren't seeing any of that ASP stuff, and I don't speak ASP anyway : )

Also, are your inline CSS styles the only CSS you have?

*edit also at first I thought the ASP dropdown and the select where the same but I see the second option is different.

I'm no expert, but I fake one on teh Internets

abtin
Offline
newbie
Last seen: 10 years 24 weeks ago
Joined: 2008-12-01
Posts: 5
Points: 0

My actual code is a uses a

My actual code is a uses a bit complicated css, so i thought i just make a sample with inline css, which in my actuall the css is not inline.. though i got the same result...

the 2 dropdownlist there uses dummeis value so they are almost the same,
and here is the code for browser view.

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml" >
<head><title>
	Untitled Page
</title></head>
<body>
    <form name="form1" method="post" action="testPage2.aspx" id="form1">
<div>
<input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="/wEPDwULLTE3MDM2Nzk3MDFkZGjwFg1Vhn4w4N3cZV57Q/dCugUD" />
</div>
 
    <div style="text-align: right; direction: rtl;">
 
        <select name="DropDownList1" id="DropDownList1" style="width:300px;">
	<option value="sdsd">ستسیت</option>
	<option value="asd">شسیشی</option>
 
</select>
        <br />
        <select dir="rtl" style="width: 300px;" >
            <option>سشیشی</option>
            <option>یشتخش</option>
        </select>
    </div>
 
<div>
 
	<input type="hidden" name="__EVENTVALIDATION" id="__EVENTVALIDATION" value="/wEWAwLH1OmJDgLl+N3BCQKo/e7wBnzOt1pVxVdZbCBYwQYlOHdUDuDl" />
</div></form>
</body>
</html>

Stomme poes
Stomme poes's picture
Offline
Elder
Netherlands
Last seen: 7 years 29 weeks ago
Netherlands
Timezone: GMT+2
Joined: 2008-02-04
Posts: 1854
Points: 378

Okay thanks, that's what I

Okay thanks, that's what I needed.

I know Gary's seen this, but strangely enough I'm not finding this specific bugs at webkit.org. I tested in Chrome which uses the same rendering engine and it works fine-- Safari's the only one doing it.

I added the dir="rtl" in the tag, added lang attributes (I added arabic (ar) though I can't tell Arabic from Farsi or whatever), everything I could think of-- nothing changed in Saffy.

I also added a normal div with a normal P juse above the form and THAT worked-- suggesting this is something to do with having rtl inside an inline element. I also tried setting the direction explicitly on the options themselves, also didn't work.

I might try setting your code into HTML4 strict, and try out some other things... there's a known problem with the Unicode bdo thingie but if your whole page is rtl (instead of switching) then that's not related.

If I can narrow down when it occurs and when it doesn't, I could add a bug report to Bugzilla at webkit.org (except I don't like dling nightly builds, so I guess I'll stick the nightly build on one Windows Virtual Machine and leave my testing Safari on the other).

So it seems to be a bug, but one that appeared after Chrome was released (I'm guessing... do you happen to have a copy of an older Safari? Or, do you know someone with a Mac with an older than 3 Safari?). I'm not sure if there's anything you can do.

The problem is definitely with the direction and not the text-align-- text-align does not change the placement of the drop-down arrows, and the arrows are not positioned properly in Safari.

Hmmm, my current test with the small changes I made is here but when I make some further test cases they'll prolly be somewhere like
stommepoes.nl/Tests/safaridirection.html or something. I already got a reduced Safari testcase in there for the + adjacent selector, for which Saffy has a strange bug.

I'm no expert, but I fake one on teh Internets

abtin
Offline
newbie
Last seen: 10 years 24 weeks ago
Joined: 2008-12-01
Posts: 5
Points: 0

Thanks mate for the

Thanks mate for the comprehensive reply,

No i dont have older sadari, and dont know anyone specific in mind who might have it. Though i would look around and let you know if you could test it in an older version.

So guess i just wait for safari to fix this bug Smile

Stomme poes
Stomme poes's picture
Offline
Elder
Netherlands
Last seen: 7 years 29 weeks ago
Netherlands
Timezone: GMT+2
Joined: 2008-02-04
Posts: 1854
Points: 378

abtin, Update: while I

abtin,

Update:
while I still haven't gotten time to make a nice Reduced Case for webkit Bugzilla (and I still can't believe this bug hasn't already been reported, I see all sorts of related rtl cases but not this one!), but on an unrelated page I tried

form select {
  text-align: right;
  text-indent: -.5em;
}

And yeah, Safari didn't do the text-align at all (on 12em wide selects) but DID do the text outdent, meaning there were no numbers showing in Safari at all!

Chrome text-aligns fine.

So you were right, there are indeed 2 bugs here: text-align doesn't work inside select options (I didn't try setting it on the option itself) in Safari but does work in Chrome, and direction doesn't seem to work on inline form elements at all in Safari (Chrome is okay there too).

I want to make reduced cases of both of these and set them both on stommepoes.nl and on Webkit Bugzilla (the text-align one might already be there, need to check). These are major bugs in my opinion. They can severely affect a page with forms.

I'm no expert, but I fake one on teh Internets