How to right align some part of text in in
up vote
0
down vote
favorite
This is current look:
I expect this:
Code:
<select class="form-control">
<option value="1123x1">SJ [1123]</option>
<option value="562x1">Rib / Int. [562]</option>
<option value="1123x3">Fleece [1123]</option>
</select>
Suggestion for select2 is also needed.
html css jquery-select2
|
show 2 more comments
up vote
0
down vote
favorite
This is current look:
I expect this:
Code:
<select class="form-control">
<option value="1123x1">SJ [1123]</option>
<option value="562x1">Rib / Int. [562]</option>
<option value="1123x3">Fleece [1123]</option>
</select>
Suggestion for select2 is also needed.
html css jquery-select2
try it like this <option value="1123x1">SJ [1123]</option>
– pravin navle
17 hours ago
I don't think it is possible only with css why don't you try dropdown list
– Viira
17 hours ago
Character length are not always same so alignment break :'(
– Amin
17 hours ago
how to do that? @Viira
– Amin
17 hours ago
possible duplicate of : stackoverflow.com/questions/50969850/…
– Temani Afif
17 hours ago
|
show 2 more comments
up vote
0
down vote
favorite
up vote
0
down vote
favorite
This is current look:
I expect this:
Code:
<select class="form-control">
<option value="1123x1">SJ [1123]</option>
<option value="562x1">Rib / Int. [562]</option>
<option value="1123x3">Fleece [1123]</option>
</select>
Suggestion for select2 is also needed.
html css jquery-select2
This is current look:
I expect this:
Code:
<select class="form-control">
<option value="1123x1">SJ [1123]</option>
<option value="562x1">Rib / Int. [562]</option>
<option value="1123x3">Fleece [1123]</option>
</select>
Suggestion for select2 is also needed.
html css jquery-select2
html css jquery-select2
edited 17 hours ago
Alon Eitan
11.1k63652
11.1k63652
asked 17 hours ago
Amin
69111
69111
try it like this <option value="1123x1">SJ [1123]</option>
– pravin navle
17 hours ago
I don't think it is possible only with css why don't you try dropdown list
– Viira
17 hours ago
Character length are not always same so alignment break :'(
– Amin
17 hours ago
how to do that? @Viira
– Amin
17 hours ago
possible duplicate of : stackoverflow.com/questions/50969850/…
– Temani Afif
17 hours ago
|
show 2 more comments
try it like this <option value="1123x1">SJ [1123]</option>
– pravin navle
17 hours ago
I don't think it is possible only with css why don't you try dropdown list
– Viira
17 hours ago
Character length are not always same so alignment break :'(
– Amin
17 hours ago
how to do that? @Viira
– Amin
17 hours ago
possible duplicate of : stackoverflow.com/questions/50969850/…
– Temani Afif
17 hours ago
try it like this <option value="1123x1">SJ [1123]</option>
– pravin navle
17 hours ago
try it like this <option value="1123x1">SJ [1123]</option>
– pravin navle
17 hours ago
I don't think it is possible only with css why don't you try dropdown list
– Viira
17 hours ago
I don't think it is possible only with css why don't you try dropdown list
– Viira
17 hours ago
Character length are not always same so alignment break :'(
– Amin
17 hours ago
Character length are not always same so alignment break :'(
– Amin
17 hours ago
how to do that? @Viira
– Amin
17 hours ago
how to do that? @Viira
– Amin
17 hours ago
possible duplicate of : stackoverflow.com/questions/50969850/…
– Temani Afif
17 hours ago
possible duplicate of : stackoverflow.com/questions/50969850/…
– Temani Afif
17 hours ago
|
show 2 more comments
1 Answer
1
active
oldest
votes
up vote
0
down vote
there must be some better solution. this is my attempt to address your problem
<select class="form-control">
<option value="1123x1">SJ [1123]</option>
<option value="562x1">Rib / Int. [562]</option>
<option value="1123x3">Fleece [1123]</option>
</select>
It would make the list to look just like in the first screenshot the OP provided, would it not?
– Alon Eitan
17 hours ago
I am generating the<option>
s from a PHP script, there may be hundreds of options
– Amin
17 hours ago
yes, but if the list is static then he can adjust the number of to get the desired result.
– pravin navle
17 hours ago
ok let me think of some workaround. this is quite tricky and a bit hard to achieve
– pravin navle
17 hours ago
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
there must be some better solution. this is my attempt to address your problem
<select class="form-control">
<option value="1123x1">SJ [1123]</option>
<option value="562x1">Rib / Int. [562]</option>
<option value="1123x3">Fleece [1123]</option>
</select>
It would make the list to look just like in the first screenshot the OP provided, would it not?
– Alon Eitan
17 hours ago
I am generating the<option>
s from a PHP script, there may be hundreds of options
– Amin
17 hours ago
yes, but if the list is static then he can adjust the number of to get the desired result.
– pravin navle
17 hours ago
ok let me think of some workaround. this is quite tricky and a bit hard to achieve
– pravin navle
17 hours ago
add a comment |
up vote
0
down vote
there must be some better solution. this is my attempt to address your problem
<select class="form-control">
<option value="1123x1">SJ [1123]</option>
<option value="562x1">Rib / Int. [562]</option>
<option value="1123x3">Fleece [1123]</option>
</select>
It would make the list to look just like in the first screenshot the OP provided, would it not?
– Alon Eitan
17 hours ago
I am generating the<option>
s from a PHP script, there may be hundreds of options
– Amin
17 hours ago
yes, but if the list is static then he can adjust the number of to get the desired result.
– pravin navle
17 hours ago
ok let me think of some workaround. this is quite tricky and a bit hard to achieve
– pravin navle
17 hours ago
add a comment |
up vote
0
down vote
up vote
0
down vote
there must be some better solution. this is my attempt to address your problem
<select class="form-control">
<option value="1123x1">SJ [1123]</option>
<option value="562x1">Rib / Int. [562]</option>
<option value="1123x3">Fleece [1123]</option>
</select>
there must be some better solution. this is my attempt to address your problem
<select class="form-control">
<option value="1123x1">SJ [1123]</option>
<option value="562x1">Rib / Int. [562]</option>
<option value="1123x3">Fleece [1123]</option>
</select>
<select class="form-control">
<option value="1123x1">SJ [1123]</option>
<option value="562x1">Rib / Int. [562]</option>
<option value="1123x3">Fleece [1123]</option>
</select>
<select class="form-control">
<option value="1123x1">SJ [1123]</option>
<option value="562x1">Rib / Int. [562]</option>
<option value="1123x3">Fleece [1123]</option>
</select>
answered 17 hours ago
pravin navle
307116
307116
It would make the list to look just like in the first screenshot the OP provided, would it not?
– Alon Eitan
17 hours ago
I am generating the<option>
s from a PHP script, there may be hundreds of options
– Amin
17 hours ago
yes, but if the list is static then he can adjust the number of to get the desired result.
– pravin navle
17 hours ago
ok let me think of some workaround. this is quite tricky and a bit hard to achieve
– pravin navle
17 hours ago
add a comment |
It would make the list to look just like in the first screenshot the OP provided, would it not?
– Alon Eitan
17 hours ago
I am generating the<option>
s from a PHP script, there may be hundreds of options
– Amin
17 hours ago
yes, but if the list is static then he can adjust the number of to get the desired result.
– pravin navle
17 hours ago
ok let me think of some workaround. this is quite tricky and a bit hard to achieve
– pravin navle
17 hours ago
It would make the list to look just like in the first screenshot the OP provided, would it not?
– Alon Eitan
17 hours ago
It would make the list to look just like in the first screenshot the OP provided, would it not?
– Alon Eitan
17 hours ago
I am generating the
<option>
s from a PHP script, there may be hundreds of options– Amin
17 hours ago
I am generating the
<option>
s from a PHP script, there may be hundreds of options– Amin
17 hours ago
yes, but if the list is static then he can adjust the number of to get the desired result.
– pravin navle
17 hours ago
yes, but if the list is static then he can adjust the number of to get the desired result.
– pravin navle
17 hours ago
ok let me think of some workaround. this is quite tricky and a bit hard to achieve
– pravin navle
17 hours ago
ok let me think of some workaround. this is quite tricky and a bit hard to achieve
– pravin navle
17 hours ago
add a comment |
draft saved
draft discarded
draft saved
draft discarded
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53237644%2fhow-to-right-align-some-part-of-text-in-option-in-select%23new-answer', 'question_page');
}
);
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
try it like this <option value="1123x1">SJ [1123]</option>
– pravin navle
17 hours ago
I don't think it is possible only with css why don't you try dropdown list
– Viira
17 hours ago
Character length are not always same so alignment break :'(
– Amin
17 hours ago
how to do that? @Viira
– Amin
17 hours ago
possible duplicate of : stackoverflow.com/questions/50969850/…
– Temani Afif
17 hours ago