1. Dashboard
  2. Artikel
  3. Mitglieder
    1. Letzte Aktivitäten
    2. Benutzer online
    3. Team
    4. Mitgliedersuche
  4. Forum
    1. Unerledigte Themen
  • Anmelden
  • Registrieren
  • Suche
Dieses Thema
  1. HTML - Webmaster Forum
  2. HTML / Webmaster Forum
  3. HTML & CSS Forum

Button Zentrieren

  • Simuletsplay
  • 17. Mai 2018 um 22:03
  • Simuletsplay
    Interessierte/r
    Beiträge
    95
    • 17. Mai 2018 um 22:03
    • #1

    Hallo... Ich habe das Problem, dass seitdem ich meine CSS-Datei ein bisschen aufgeräumt hab, dass ich dort ein Problem hab!

    → Mein Button ist nicht mehr zentriert... Ich hab schon alles probiert und sonst was...

    Webseite: http://simuundquex.de

    Hier die Codes:

    Code
    <section>			<div id="buttondiv">
    				<button type="button" id="createclan" onclick="location.href='ts3server://simuundquex.de'"><i class="fa fa-microphone"></i>  Verbinde dich auf unseren Teamspeak</button>
                </div>
    			</section>
    Code
    #butttondiv {
    	display: block;
    	align-items: center;
    	justify-content: center;
    	margin-top: 20px;
    	text-align: center;
    }
    #createclan
    {
    	background-color: #2e9011;
    	border: none;
        color: white;
        padding: 15px 32px;
        text-decoration: none;
        font-size: 16px;
        cursor: pointer;
    	float: center;
    	border: 3px solid #4c8450;
    	display: block;
    	align-items: center;
    	justify-content: center;
    	-o-transition: color .2s ease-out, background .2s ease-in;
    	-ms-transition: color .2s ease-out, background .2s ease-in;
    	-moz-transition: color .2s ease-out, background .2s ease-in;
    	-webkit-transition: color .2s ease-out, background .2s ease-in;
    	transition:color .2s ease-out, background .2s ease-in;
    }
    #createclan:hover
    {
        color: #4c8450;
    	background-color: white;
    	border: 3px solid #4c8450;
    }
    Alles anzeigen
  • Sailor
    Meister(in)
    Reaktionen
    4
    Beiträge
    403
    • 17. Mai 2018 um 22:16
    • #2

    Als Erstes solltest du diese Fehlversuche mit 'float', 'align-item' und 'justify-content' löschen und dann stattdessen für den Button...

    HTML
    #createclan {
      margin: 0 auto;
    }


    einfügen.

    if(!sleep)

    {$sheep++;}

Tags

  • button
  • server
  • color
  • http
  • ton
  • problem
  • click
  • href
  • location
  • datei
  • div
  • ts
  • pointer
  • font
  • css
  • cursor
  • center
  • px
  • zentriert
  • padding
  • section
  • teamspeak
  • items
  • url
  • microphone

Benutzer online in diesem Thema

  • 1 Besucher
  1. Datenschutzerklärung
  2. Impressum
Community-Software: WoltLab Suite™
  • Alles
  • Dieses Thema
  • Dieses Forum
  • Artikel
  • Seiten
  • Forum
  • Erweiterte Suche
Zitat speichern