Hi, i have problem whit a border, i want to set to center but make's higher column when it's to the center, please help me.

there it's the original code:
saveus

<label for="">Nume de utilizator: *</label> 
<input class="bar curved5" name="user" type="text" 
id="user" 
maxlength="16" 
value="" 
onFocus="change(1)" 
class="validate[required,custom[noSpecialCharacters],length[5,16]]"
/> 

there it's the modify code:
saveus1

 <label for="">Nume de utilizator: *</label> 


<div align="center">


<input class="bar curved5" name="user" type="text" 
id="user" 
maxlength="16" 
value="" 
onFocus="change(1)" 
class="validate[required,custom[noSpecialCharacters],length[5,16]]"
/>  


</div>

there it's how i want:
saveus2

Recommended Answers

have you tried:

<center>

<input class="bar curved5" name="user" type="text" 
id="user" 
maxlength="16" 
value="" 
onFocus="change(1)" 
class="validate[required,custom[noSpecialCharacters],length[5,16]]"
/>  

</center>

?

Jump to Post

I'd make the <label> have the same height and line-height of the input, and use margin to create the space between them.

Jump to Post

Dear cristian.stilpeanu.3, may you try this:

<div align="center" style="height:3em">
    <label for="">Nume de utilizator: *</label>
    <input class="bar curved5" name="user" type="text" id="user" maxlength="16" value="" onFocus="change(1)" class="validate[required,custom[noSpecialCharacters],length[5,16]]" />
</div>
Jump to Post

All 9 Replies

have you tried:

<center>

<input class="bar curved5" name="user" type="text" 
id="user" 
maxlength="16" 
value="" 
onFocus="change(1)" 
class="validate[required,custom[noSpecialCharacters],length[5,16]]"
/>  

</center>

?

I'd make the <label> have the same height and line-height of the input, and use margin to create the space between them.

Dear cristian.stilpeanu.3, may you try this:

<div align="center" style="height:3em">
    <label for="">Nume de utilizator: *</label>
    <input class="bar curved5" name="user" type="text" id="user" maxlength="16" value="" onFocus="change(1)" class="validate[required,custom[noSpecialCharacters],length[5,16]]" />
</div>

saveus10

This post has no text-based content.

The prob is that the text should be on the left and the input in the middle ?
if yes, here's the code:
try it:

<div style="height:4em; width:100%;">
    <div style="height:100%; width:40%; float:left; line-height:3em;">
        <label for="">Nume de utilizator: *</label>
    </div>    
    <div style="width:100%;" align="left" style="float:right;">   
        <input onfocus="change(1)" value="" maxlength="16" id="user" name="user" style="height:3em" class="bar curved5" type="text">
    </div>
</div>

thank you very much amirbwb it works!

i edit height:4em whit height:3em and it's perfect.

You are welcome :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of 1.20 million developers, IT pros, digital marketers, and technology enthusiasts learning and sharing knowledge.