myGully.com

myGully.com (https://mygully.com/index.php)
-   Programmierung (https://mygully.com/forumdisplay.php?f=67)
-   -   Css Problem (https://mygully.com/showthread.php?t=2037239)

Kaiser_toby 03.05.10 15:20

Css Problem
 
.textinhalt1 {
text-align:left;
font-weight:bold;
font-size:1em;
padding-bottom:14px;
font-size:100%;
}

.textinhalt2 {
text-align:justify;
font-weight:bold;
padding-bottom:16px;
font-size:200%;
}


hallo,

möchte in beiden Fällen die Schriftgröße ändern, damit ich es dann allgemein auf alle Seiten per CSS übernehmen kann.
ich hab es jetzt mit % versucht und mit px und pt, aber er nimmt es nicht an, weiß jemand wo der fehler liegt vielleicht ist er so leicht das ich ihn übersehen habe.
Hab schon im I-net rumgesucht und alle größen angaben durch.

Gruß

urga 03.05.10 18:25

?
Code:

<html>
        <head>
<style type='text/css'>
.textinhalt1 {
text-align:left;
font-weight:bold;
font-size:1em;
padding-bottom:14px;
font-size:100%;
}

.textinhalt2 {
text-align:justify;
font-weight:bold;
padding-bottom:16px;
font-size:200%;
}
       
</style>               
        </head>
        <body>
                <span class='textinhalt1'>blabla</span>
                <span class='textinhalt2'>blabla</span>
        </body>
</html>

funzt doch prima ...
mir ist gerade danach:
hier eine mittels jquery aufgepeppte variante. mit der maus einfach über die texte fahren...
Code:

<html>
        <head>
                <s***** type="text/javas*****" src="http://api.jquery.com/browser/lib/jquery/jquery.js"></s*****>
                <style type='text/css'>
                .textinhalt1 {
                        text-align:left;
                        color: red;
                        font-weight:bold;
                        font-size:1em;
                        padding-bottom:14px;
                        font-size:150%;
                }

                .textinhalt2 {
                        text-align:justify;
                        font-weight:bold;
                        padding-bottom:16px;
                        font-size:200%;
                }
                </style>               
                <s***** type="text/javas*****">
                        function rand_size () {
                                var new_size = 50 + parseInt(Math.random() * 200);
                                new_size = new_size + ((Math.random() > 0.5) ? '%' : 'px');
                                $(this).css('font-size', new_size);
                                $(this).children().html ('größe :' + new_size);
                        }
                        $(document).ready(function(){
                                        $(".textinhalt1,.textinhalt2").bind
                                          ("mouseenter mouseleave", rand_size);
                                        });
                </s*****>
        </head>
        <body>
                <span class='textinhalt1'>ein Text <span class="info"></span></span><br>

                <span class='textinhalt2'>und noch ein Text <span class="info"></span></span>
        </body>
</html>



Alle Zeitangaben in WEZ +1. Es ist jetzt 15:11 Uhr.

Powered by vBulletin® (Deutsch)
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.