Register for your free account! | Forgot your password?

Go Back   elitepvpers > Coders Den > Web Development
You last visited: Today at 20:21

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

Advertisement



margin-right für main klappt nicht

Discussion on margin-right für main klappt nicht within the Web Development forum part of the Coders Den category.

Reply
 
Old   #1
 
elite*gold: 300
Join Date: Apr 2013
Posts: 3,234
Received Thanks: 1,205
margin-right für main klappt nicht

Hey, iwie klappt bei der navi margin-right ohne probleme, bei main aber nicht..

hier der code:

Code:
main{
    width: 100%;
    float: left;
    border-style: solid;
    border-width: 2px;
    border-radius: 8px;
    margin-right: 1em;
    margin-left: 1em;
}

main > article > div{
    width: 50%;
    float: left;
    margin-top: 1em;
    margin-right: 1em;
    margin-left: 1em;
    margin-bottom: 0.5em;
    border-style: solid solid solid solid;
    border-width: 2px;
    border-radius: 5px;
}

main > article > div > h3{
    text-align: center;
    width: 100%;
    border-style: none none solid none;
    border-width: 1px;
    border-bottom-left-radius: 8px; 
    border-bottom-right-radius: 8px; 
}

main > article > div > p{
    text-align: left;
    margin-left: 1em;
    margin-right: 1em;
    margin-top: 2em;
    margin-bottom: 2em;
}

#login{
    width: auto;
    float: left;
    text-align: center;
    margin-left: 1em;
    margin-top: 1em;
    border-style: solid solid solid solid;
    border-width: 2px;
    border-radius: 8px;
}

#login > form{
    margin-top: 1em;
    margin-bottom: 1em;
    margin-right: 1em;
    margin-left: 1em;
    text-align: left;
}
woran liegt das?
#Saiirex is offline  
Old 10/12/2015, 22:21   #2
 
.SkyneT.'s Avatar
 
elite*gold: 273
Join Date: Sep 2010
Posts: 1,831
Received Thanks: 786
Etwas HTML oder ein wäre ganz nett.
.SkyneT. is offline  
Old 10/12/2015, 22:44   #3
 
elite*gold: 0
Join Date: Jun 2009
Posts: 593
Received Thanks: 109
Margin kann nicht mit der einheit em angegeben werde, das steht in keiner relation zu irgendwas -> entweder % oder px, wenn du dein element mittig haben willst dann mit margin: 0 auto -> 0 für oben/unten; auto für rechts/links
Hier als codepen:
Außerdem wenn du schon die breite 100% vergibst und dein margin noch darauf rechnen würdest wären das über 100% -> geht schlecht -> also margin-right/left:5% und width 90% wäre auch eine Möglichkeit
sven12345 is offline  
Thanks
2 Users
Reply


Similar Threads Similar Threads
remove a server name in <span style="margin-left: -51px; margin-top: -36px; opacity:
01/12/2010 - Dekaron Private Server - 3 Replies
the server list menu of my client is like this Dekaron Ultra Test Server How to remove Test Server??? Which file to edit?



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


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.