Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > General Coding
You last visited: Today at 20:16

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Some CSS Problems

Discussion on Some CSS Problems within the General Coding forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: LOCKED
Join Date: Oct 2009
Posts: 1,088
Received Thanks: 110
Some CSS Problems

Hay,

ich habe nun eine Seite angelegt, alles ist in Ordnung und ohne Probleme.
Jetzt merke ich dass ich schon paar Seiten hab aber mir nie Gedanken darüber gemacht wie ich eine Sache mache und zwar:

Ein Background. Und ein anderen Background in der Seite drinnen, was ich meine ist, dass ganz hinten z.B. Schwarz ist und in der Mitte Weiß. Ich hoffe ihr wisst was ich meine weiß nicht wie ich es erklären soll^^


LG
Asacs™ is offline  
Old 11/05/2011, 19:27   #2
 
Snake124's Avatar
 
elite*gold: 30
Join Date: Aug 2006
Posts: 110
Received Thanks: 28
meinst du sowas?



Snake124 is offline  
Old 11/05/2011, 19:31   #3
 
elite*gold: LOCKED
Join Date: Oct 2009
Posts: 1,088
Received Thanks: 110
ja schon, aber wo kommt was rein? Ich scripte bissel anders.

Meine css:

Code:
*{
	padding : 0px;
	margin: 0px;

}
/* Header */
header {
	
	background: url(images/header.png);
	background-repeat:no-repeat;
	height: 250px;
	border: white 1px groove;

}
/* NAVI */

nav ul {

	list-style-type: none;
	font-size: 18pt;
	font-style: arial;
	font-weight: bold;

	
}
und so weiter.

Lg
Asacs™ is offline  
Old 11/05/2011, 19:40   #4
 
Snake124's Avatar
 
elite*gold: 30
Join Date: Aug 2006
Posts: 110
Received Thanks: 28
ich denke mein beispielcode reicht da locker aus oO

der body ist global, also zählt ach für deine seite. für den grünen(oder was auch immer welche farbe) hintergund musst du deine contentelemente mit einem bg versehen.

ohne htmldatei kann ich dir nicht genau sagen wo etwas hin muss.

desweiteren brauchst du mir keine pn mit dem threadlink schicken, ich schau auch so rein
Snake124 is offline  
Old 11/05/2011, 19:55   #5
 
elite*gold: LOCKED
Join Date: Oct 2009
Posts: 1,088
Received Thanks: 110
Html im Anhang.

Ich habs jetzt versucht selber hinzubekommen, aber anstatt die mitte farbe ändert. Ändert sich nur der Footer.
Attached Files
File Type: zip index.zip (582 Bytes, 1 views)
Asacs™ is offline  
Old 11/05/2011, 19:59   #6
 
Snake124's Avatar
 
elite*gold: 30
Join Date: Aug 2006
Posts: 110
Received Thanks: 28
PHP Code:
<!DOCTYPE html>


<
head>
    <
titleAsacs Home </title>
    <
link rel="stylesheet" type="text/css" href="style.css" />
</
head>

<
body>
<
div class="content">
<
header>


</
header>

<
nav>
    <
ul>
        <
a href="#"><li>Home</li></li></a>
        <
a href="register/index.php" target="_blank"><li>Anmelden</li></li></a>
        <
a href="forum.htm"><li>Forum</li></li></a>
        <
a href="launcher.htm"><li>Launcher</li></li></a>
        <
a href="admins.htm"><li>Team</li></li></a>
        <
a href="impressum.htm"><li>Impressum</li></li></a>
            
    </
ul>
</
nav>


    <
section>
    
        <
article>
            <
h2><font color="Red" face="Showcard Gothic" size="7">TEST</font></h2>
            <
p><b><font size="5" face="Arial Black">TEST TEST</font></b></p>
            </
font></p>

        </
font></p>
            
        </
article>

    



    
    
    </
section>

    <
aside>
......................................
......................................
......................................
......................................
......................................
......................................
......................................
......................................
......................................
......................................
......................................
    </
aside>
    
    <
footer>
        <
p>Copyright ©2011WWW.PURE-MANGA.DE Coded by Asacs Designed by Asacs</p
    </
footer>
</
div>



</
body>
</
html
in deiner cssdatei musste noch einfügen:
Code:
.content{
    background-color:#FARBE;
}


edit: wenns immernoch probleme gibt adde mich in skype oder icq
Snake124 is offline  
Old 11/05/2011, 20:15   #7
 
elite*gold: LOCKED
Join Date: Oct 2009
Posts: 1,088
Received Thanks: 110
Jau passt danke. Dachte erst das es nicht geht. Aber hatte den punkt bei content{ weg gelassen. Sagst du mir warum da ein punkt hin kommt?

Lg
Asacs™ is offline  
Old 11/05/2011, 20:23   #8
 
Snake124's Avatar
 
elite*gold: 30
Join Date: Aug 2006
Posts: 110
Received Thanks: 28
der punkt deklariert das css element als klasse
eine raute macht das element zur id(wäre dann zb <div id="content">blah</div>)
ids können nur einmalig verwendet werden, klassen mehrmals

und für thx bitte den thanksbutton benutzen

mfg
Snake124 is offline  
Thanks
1 User
Old 11/05/2011, 22:13   #9
 
JacK le chilla's Avatar
 
elite*gold: 2
Join Date: May 2011
Posts: 448
Received Thanks: 110
wenn du es mal erweitern willst oder probleme hast es kam schon oft vor das jemand beim zentrieren mit css gescheitert ist dabei ist es kindergartenniveau einfach eine widht angeben und margin-left:auto; margin-right:auto; rein und tada es ist in der mitte man muss eben nur eine feste breite bitte in PIXELN! in % ist sowas affig
JacK le chilla is offline  
Old 11/06/2011, 00:57   #10
 
elite*gold: 59
Join Date: Jun 2007
Posts: 374
Received Thanks: 86
Quote:
Originally Posted by JacK le chilla View Post
wenn du es mal erweitern willst oder probleme hast es kam schon oft vor das jemand beim zentrieren mit css gescheitert ist dabei ist es kindergartenniveau einfach eine widht angeben und margin-left:auto; margin-right:auto; rein und tada es ist in der mitte man muss eben nur eine feste breite bitte in PIXELN! in % ist sowas affig
margin: 0 auto;

Dies bewirkt genau das gleiche nur dass du da nur einmal margin nutzen musst.

Und ja, wie du schon sagtest, die Pixel-Einheit sollte man benutzen denn bei % hat man oft das Problem dass später nichts mehr an der Position ist wo es soll UND es ist eine ungenaue Einheit. :P
Devil589 is offline  
Old 11/06/2011, 01:06   #11
 
NotEnoughForYou's Avatar
 
elite*gold: 0
Join Date: Jun 2010
Posts: 3,406
Received Thanks: 2,024
Quote:
Originally Posted by Devil589 View Post
margin: 0 auto;

Dies bewirkt genau das gleiche nur dass du da nur einmal margin nutzen musst.

Und ja, wie du schon sagtest, die Pixel-Einheit sollte man benutzen denn bei % hat man oft das Problem dass später nichts mehr an der Position ist wo es soll UND es ist eine ungenaue Einheit. :P
% richtet sich nach dem Bildschirm. Da jeder Bildschirm anderst ist, hat man natürlich verschiedene Ergebnisse. 1px ist auf jedem Bildschirm gleich, 1% nicht.
NotEnoughForYou is offline  
Old 11/06/2011, 01:34   #12
 
elite*gold: LOCKED
Join Date: Oct 2009
Posts: 1,088
Received Thanks: 110
Hat sich alles schon geklärt, aber trotsdem danke für eure bemühungen. Bin nicht grad der 100% noob in HTML
Asacs™ is offline  
Reply


Similar Threads Similar Threads
5165 Problems! 2 problems!
02/28/2010 - CO2 Private Server - 8 Replies
Okay so NOW I get these 2 problems in ma command prompt window of ma source... 2 problems: I really need help since I dunno wtf is the problem on 1 and 2...I'd appreciate it!
[Problems] Source 5165 All Problems
11/28/2009 - CO2 Private Server - 7 Replies
Hello Everyone, Ok i will put All my problems here So i hope noone spamming and Say Go learn C# and w/e 1-RegPage: fixed all by adding  to the start of the pass and  to the end of the pass. its working okay and when i create character and try to rejoin the game close with itself Note: When i make From NewestCOServer Cmd it works fine and the game dont close i mean i want other players to make thier own accounts and dont ask me to make them The Accounts they want. 2-Lottery: Cant...
two problems,help me please
04/17/2009 - EO PServer Hosting - 12 Replies
http://www.elitepvpers.com/forum/attachment.php?att achmentid=21553&stc=1&d=1239854546 chat e date
Need help with some lil problems :)
09/06/2008 - CO2 Private Server - 2 Replies
Old old old
[Problems]Having problems in Cabal Wudijt
07/01/2008 - Cabal Online - 0 Replies
1>im having problems in registering in Wudijt can anyone help me give me working link 2>i cant seem to update my red cabal online is it offline? 3>when i load Cabal.exe the cabal window will just dissapear please help me,i followed everyone's advice but it doesnt work, can anyone tell me what the real problem? thanks! ^_^



All times are GMT +1. The time now is 20:17.


Powered by vBulletin®
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2026 elitepvpers All Rights Reserved.