Fixed Web page language encoding, font size, font

Source: Internet
Author: User
Tags add
Coding | Web pages sometimes, because of the visitor's browser settings problem, make your page in other people's view and you expect a big difference. Are we the only ones who are "still slaughtered"? No, here's how to get your page fixed by your thoughts.

  1 language encoding of text

Your Chinese page may be in someone else's browser is displayed as garbled, this is because someone else's browser text encoding is not Simplified Chinese. Add the next sentence between <meta http-equiv= "Content-type" content= "text/html;charset=gb2312" >

  2 fixing of the font size

The browser's font size is set to five items-largest, large, medium, small, and smallest, if you are in the medium word layout, in other people's large word browser may not be very beautiful. Add the following CSS statement between <style>
<!--
p {font-size:9pt};
td {FONT-SIZE:9PT};
Li {font-size:9pt};
Select {FONT-SIZE:9PT};
-->
<style>
Where the font-size:9pt size is fixed at 9 lbs (typically this value), Netscape's browser does not support the retention of Li and select.

  3 Fixed Font

General browser fonts are set to XXFarEastFont-Arial, but others are set to italic. By adding the following CSS statement between <style>
<!--
P {font-family: "Song Body"};
TD {Font-family: "Song Body"};
Li {font-family: "Song Body"};
Select {font-family: "Song Body"};
-->
<style>
2 and 3 can be used in combination, such as p {font-family: "Song Body"; font-size:9pt};



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.