简体   繁体   中英

How do you customize the login-fields in php to make a site similar to Facebook or other popular login sites?

For example, with the login I made with a php script, the login boxes (username and password) are blocky (I've seen rounded corners login-forms) and the spacings are uneven (one is above the other).

Is there anyway to customize how login-boxes are designed and aligned in php, similar to how css is used at times (I'm not as familiar with css) or within php?

http://img845.imageshack.us/i/facebooklogin.jpg vs. http://img577.imageshack.us/i/loginq.jpg/

CSS is the way to style this. If you aren't comfortable doing it, try to find some CSS stylesheets that already exist to style forms.

Alternatively, you can use javascript plugins like jQuery's uniform and call it on your inputs to style them automagically.

Styling of any html form fields, regardless of how they're processed, should be done with CSS. It's not hard - there's a great tutorial/reference at w3schools .

In response to your specific question (rounded corners), you'd use the border-radius property:

    <style> 
    .rounded  {
        border: 1px solid black;
        -moz-border-radius: 10px;
        -webkit-border-radius: 10px;
    }
    </style> 

    <input type="text" class="rounded" name="username" /> 

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM