开发者

setting size with css

开发者 https://www.devze.com 2023-01-04 12:20 出处:网络
i have a problem..my tabs name show too big i want it shows as a default... i put this script at <head>..

i have a problem..my tabs name show too big i want it shows as a default... i put this script at <head>..

<style type="text/css">
                { font-family: Verdana; font-size:40%; }
                label { width: 15em; float: left; }
                label.error {display: none; float: none; color: red; padding-left: .5em; vertical-align: top; }
                p { clear: both; }
                .submit { ma开发者_运维问答rgin-left: 12em; }
                 em { font-weight: bold; padding-right: 1em; vertical-align: top; }

        </style>



        <style type="text/css">
                body 
                {
                        font-family:Times new roman, verdana;
                        font-size:22px;
                        width: 850px;
                        margin-left: auto;
                        margin-right: auto;
                        margin-top: 6px;
                        background-image:url("wood_texture2.jpg");
                }
        </style>

it makes all setting inside <body> in same size..where is my fault?how to make separate size for each item inside body?


There's a syntax error on the first line of your css

{ font-family: Verdana; font-size:40%; }

Maybe it should be

body { font-family: Verdana; font-size:40%; }


Don't use the width-attribute within the body-style-declaration. It doesn't make any sense. Instead set the width/height for each element you want to give a special size:

div {
    width: 30px;
    height: 50px;
    background-color: #F00;
}

As you already did with .sumbit in your code use classes for the same html-elements which should have different styles.

0

精彩评论

暂无评论...
验证码 换一张
取 消