There is always a blank line at the top of the php display page.

Source: Internet
Author: User
There is always a blank line at the top of the php display page

Code




No sdf






BeginWidget ('cactiveform', array (
'Id' => 'Login-form ',
'Enablesclientvalidation '=> true,
'Clientopexception' => array (
'Validateonsubmit '=> true,
),
);?>


LabelEx ($ model, 'Username');?>
TextField ($ model, 'Username');?>
Error ($ model, 'Username');?>




LabelEx ($ model, 'password');?>
PasswordField ($ model, 'password');?>
Error ($ model, 'password');?>




CheckBox ($ model, 'memberme');?>
Label ($ model, 'Remember me ');?>
Error ($ model, 'memberme');?>








EndWidget ();?>








-- Css
Body {
Font-size: 14px;
Margin: 0px;
Font-family: "";
}

. Container {
Margin-top: 0px;
Width: 100%;
Background-color: # 6633CC;
}

. Main {
Width: 100%;
Min-height: 500px;
}

. Form {
Padding-top: 250px;
Padding-left: 850px;
}


-- Under firefox dug



????? // The error is blank here


No sdf




Reply to discussion (solution)

Code posted above

Save as UTF-8 without bom format

This is the reason for saving it as UTF-8 without bom format. to convert the encoding format, you must use the BOM-free format. I have encountered this problem before. after a long time, I accidentally changed it and found the problem.

I used notepad ++ to change the encoding format. there is still a blank space. The tag is still in the body.

Set {padding: 0px; margin: 0px} for the body...

All settings are useless.

Css ----

Body {
Padding: 0px;
Font-size: 14px;
Margin: 0px;
Font-family: "";
}

. Container {
Margin-top: 0px;
Width: 100%;
Background-color: # 6633CC;
}

. Main {
Width: 100%;
Min-height: 500px;
}

. Form {
Padding-top: 250px;
Padding-left: 850px;
}

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.