CSS to create a few small questions and answers

Source: Internet
Author: User

Intermediary transaction http://www.aliyun.com/zixun/aggregation/6858.html ">seo diagnose Taobao guest cloud host technology Hall

the display and hiding of the div layer


: Div's visibility can control the display and hiding of Div, but hide the page to show blank:


The following is code:


style= "Visibility:none;"


document.getElementById ("Typediv1"). style.visibility= "hidden";/Hide


document.getElementById ("Typediv1"). style.visibility= "visible"; show


A: By setting the Display property, you can hide the div and release the occupied page space, as follows


The following is code:


style= "Display:none;"


document.getElementById ("Typediv1"). style.display= "None";/Hide


document.getElementById ("Typediv1"). style.display= ""/Show


Two, set up a layer of CSS properties, why IE6 under the normal, under the IE7 display is not normal?


A: Set the CSS properties of the layer, why under the IE6 display Normal, under the IE7 display is not normal? That is, whether it is set height:30px, but without effect.


The following is code:


header{


margin-top:5px;


width:760px;


padding-top:0px;


height:30px;


border:1px solid #A5B5C0;


}


A: Although IE7 support for the standard is still not satisfactory, but relative to the IE6 also said that has been a step, and for the production of Web pages, we should pay more attention to the writing of CSS to pay attention to the problem, see the CSS is written to meet the standards of the Web.


Modify the following code:


. Header {


margin-top:5px;


width:760px;


padding-top:0px;


height:30px;


border:1px solid #A5B5C0;


}


from the above we see that if we add a space between the. Header and {, it will do, because under IE6, you can ignore this space, and show Normal, in the IE7 under the reason of the standard can not be normal display.


Third, how to correctly set up and enter the copyright of all the © symbol


Q: When making a site, often at the bottom of their own site plus all the copyright symbols, but we often have to save the page when the code is not so prompt, that is, is saved, displayed on the Web page is also a "? "If we use & opy; insert it directly into the Web page, the symbol is in the source code & copy; (note:& and copy have no spaces between, in order to normally show all this written) form. In addition, although you can easily copy from other sites, but in the form of Web page always feel strange, a little small, see what is that symbol, then how to set the right to beautiful?


A: In order to be beautiful, it is best to write some conditions in CSS.


The following is code:


<div class= "foot" >


Copyright & copy; 2007-2009 www.xxx.com All rights reserved <a href= "http://www.miibeian.gov.cn" target= "_blank" > Lu ICP 备 No. No. 07007591 </a></div>


we can see, control & copy; The CSS class is "foot", then we add "font:12px/1.5 Arial" to the foot. This condition modifies the © symbol for all copyrights.


The following is code:


Foot {


font:12px/1.5 Arial;


}


This article from the Webmaster Learning Network-www.zxx6.com, welcome reprint, Reprint please indicate the source.

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.