i want to align container of the OPTIONS of the select element to the right... the default is showing OPTIONS on the LEFT BOTTOM of the control...
so how will i show OPTIONS aligned to the RIGHT BOTTOM of the select element?
take care...
Similarly, to right align a paragraph on the canvas with HTML's align attribute you could have: <P align="right">...
The <center> tag was used in HTML4 to center-align text.
The HTML <p> align Attribute is used to specify the alignment of paragraph text content.
While the other answers are correct, and you can use the style
attribute, you'd be better off using an external CSS file.
In your HTML document, add a <link>
to your CSS file in the <head>
of the document:
<head>
<title>Example</title>
<link type="text/css" rel="stylesheet" href="path/to/the/file.css" />
</head>
Give your <select>
(or the <option>
) element a class
attribute.
<select class="JamalAbdulNasir">
<option class="Jamal">Jamal</option>
<option class="Abdul">Abdul</option>
<option class="Nasir">Nasir</option>
</select>
In your style sheet include a CSS rule which targets that <select>
tag by class
attribute.
select.JamalAbdulNasir {
text-align:right;
}
... or the <option>
tag you want to be right-aligned.
input.Abdul {
text-align:right;
}
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With