2017-03-31 3 views
0

Dies ist ein Noob Quesston aber, warum habe ich weißen Abstand um mein positioniertes nav? Ich erstellte ein Nav, das auf der Unterseite für Moblie-Geräte erscheint und ich habe wie oben und unten Polsterung in meinem Nav-Element, aber wenn Ich hebe die Dev-Tools auf, es gibt keine Polsterung oder irgendetwas, von dem ich denke, dass es das verursacht. Was ist das und wie kann ich es entfernen?Warum habe ich weißen Abstand um mein positioniertes Nav?

https://jsfiddle.net/7am3d06L/

<html> 
    <head> 
     <title>Somalia</title> 
     <meta charset="utf-8"> 
     <meta name="keywords" content="css, html, test"> 
     <meta name="description" content="This is an html and css review"> 
     <meta name="viewport" content="width=device-width, initial-scale=1.0"> 
     <style>  
      *{ 
       text-align: center; 
      } 
      h1,nav{ 
       font-family: arial; 
      } 
      #headerNav{ 
       display: none; 
      } 
      #footerNav{ 
       position: fixed; 
       bottom: 0px; 
       width: 100%; 
       background-color: white; 
       padding: 0; 
      } 
      nav ul{ 
       padding: 0; 
      } 
      nav li{ 
       list-style-type: none; 
       border: 1px solid black; 
       margin: 0; 
      } 

      nav a{ 
       text-decoration: none; 
       font-weight: 700; 
      } 

      nav a, nav a:visited { 
       color: green; 
      } 

     </style> 
    </head> 
    <body> 
     <header> 
      <h1>Somalia</h1> 
      <nav id="headerNav"> 
       <ul> 
        <li><a href="index.html">Home</a></li> 
        <li><a href="historyAndPolitics.html">History And Politics</a></li> 
        <li><a href="Geography">Geography</a></li> 
        <li><a href="economy.html">Economy</a></li> 
        <li><a href="cultureAndDemographics.html">Culture And Demographics</a></li> 
       </ul> 
      </nav> 
     </header> 
     <article> 
     <p> 
     Somalia (/səˈmɑːliə, soʊ-, -ljə/ so-mah-lee-ə; Somali: Soomaaliya; Arabic: الصومال‎‎ aṣ-Ṣūmāl), 
     officially the Federal Republic of Somalia[1] (Somali: Jamhuuriyadda Federaalka Soomaaliya, Arabic: 
     <bdi>جمهورية الصومال الفيدرالية</bdi>‎‎ Jumhūrīyat aṣ-Ṣūmāl al-Fidirālīyah), is a country located in the 
     Horn of Africa. It is bordered by Ethiopia to the west, Djibouti to the northwest, the Gulf of Aden to the 
     north, the Indian Ocean to the east, and Kenya to the southwest. Somalia has the longest coastline on 
     Africa's mainland, and its terrain consists mainly of plateaus, plains and highlands. Climatically, hot 
     conditions prevail year-round, with periodic monsoon winds and irregular rainfall. 
     </p> 
     <p>Somalia has an estimated population of around 12.3 million. Around 85% of its residents are ethnic 
     Somalis,[3] who have historically inhabited the northern part of the country. Ethnic minorities are largely 
     concentrated in the southern regions. The official languages of Somalia are Somali and Arabic, both of 
     which belong to the Afroasiatic family. Most people in the country are Muslim, with the majority being Sunni. 
     </p> 

     <p>In antiquity, Somalia was an important commercial centre. It is among the most probable locations of the 
     fabled ancient Land of Punt. During the Middle Ages, several powerful Somali empires dominated the regional 
     trade, including the Ajuran Empire, the Adal Sultanate, the Warsangali Sultanate, and the Geledi Sultanate. 
     In the late 19th century, through a succession of treaties with these kingdoms, the British and Italian 
     empires gained control of parts of the coast and established the colonies of British Somaliland and Italian 
     Somaliland.[19][20] In the interior, Mohammed Abdullah Hassan's Dervish State repelled the British Empire 
     four times and forced it to retreat to the coastal region, before succumbing to defeat in 1920 by British 
     airpower.[22] The toponym Somalia was coined by the Italian explorer Luigi Robecchi Bricchetti (1855–1926). 
     Italy acquired full control of the northeastern, central and southern parts of the area after successfully 
     waging the so-called Campaign of the Sultanates against the ruling Majeerteen Sultanate and Sultanate of 
     Hobyo.[20] Italian occupation lasted until 1941, yielding to British military administration. British 
     Somaliland would remain a protectorate, while Italian Somaliland in 1949 became a United Nations 
     Trusteeship under Italian administration, the Trust Territory of Somaliland. In 1960, the two regions 
     united to form the independent Somali Republic under a civilian government.</p> 

     <p>The Supreme Revolutionary Council seized power in 1969 and established the Somali Democratic Republic. 
     Led by Mohamed Siad Barre, this government later collapsed in 1991 as the Somali Civil War broke out. 
     Various armed factions began competing for influence in the power vacuum, particularly in the south. 
     During this period, due to the absence of a central government, Somalia was a "failed state", and residents 
     returned to customary and religious law in most regions. A few autonomous regions, including the 
     Somaliland and Puntland administrations emerged in the north. The early 2000s saw the creation of fledgling 
     interim federal administrations. The Transitional National Government (TNG) was established in 2000, 
     followed by the formation of the Transitional Federal Government (TFG) in 2004, which reestablished 
     national institutions such as the military. In 2006, the TFG, assisted by Ethiopian troops, 
     assumed control of most of the nation's southern conflict zones from the newly formed Islamic Courts Union 
     (ICU). The ICU subsequently splintered into more radical groups such as Al-Shabaab, which battled the TFG 
     and its AMISOM allies for control of the region.</p> 

     <p>By mid-2012, the insurgents had lost most of the territory that they had seized. In 2011–2012, a 
     political process providing benchmarks for the establishment of permanent democratic institutions was 
     launched. Within this administrative framework a new provisional constitution was passed in August 2012, 
     which reformed Somalia as a federation.[29] Following the end of the TFG's interim mandate the same month, 
     the Federal Government of Somalia, the first permanent central government in the country since the start 
     of the civil war, was formed[30] and a period of reconstruction began in Mogadishu. Somalia has maintained 
     an informal economy, mainly based on livestock, remittances from Somalis working abroad, and 
     telecommunications</p> 
     </article> 
     <footer> 
      <nav id="footerNav"> 
       <ul> 
        <li><a href="index.html">Home</a></li> 
        <li><a href="historyAndPolitics.html">History And Politics</a></li> 
        <li><a href="Geography">Geography</a></li> 
        <li><a href="economy.html">Economy</a></li> 
        <li><a href="cultureAndDemographics.html">Culture And Demographics</a></li> 
       </ul> 
      </nav> 

     </footer> 
    </body> 
</html> 

Antwort

1

Sie setzen die padding aber Sie müssen die margin auch zurückgesetzt werden:

nav ul{ 
    padding: 0; 
    margin: 0; 
} 

example

+0

Ein Mann hat mich bis zum Schlag geschlagen. Die Ursache war die Marge auf der ul sein> 0. –

+0

Valar morghulis –

+0

Dank ich nicht erkennen, Marge kann Farbe haben Ich dachte, es war einfach nur Platz, die Elemente auseinander geschoben. – alexis

0

*{ 
 
\t \t \t \t \t text-align: center; 
 
\t \t \t \t } 
 
\t \t \t \t h1,nav{ 
 
\t \t \t \t \t font-family: arial; 
 
\t \t \t \t } 
 
\t \t \t \t #headerNav{ 
 
\t \t \t \t \t display: none; 
 
\t \t \t \t } 
 
\t \t \t \t #footerNav{ 
 
\t \t \t \t \t position: fixed; 
 
\t \t \t \t \t bottom: 0px; 
 
\t \t \t \t \t width: 100%; 
 
\t \t \t \t \t background-color: white; 
 
\t \t \t \t \t padding: 0px; 
 
\t \t \t \t } 
 
\t \t \t \t nav ul{ 
 
\t \t \t \t \t padding: 0px; 
 
      margin: 0px 
 
\t \t \t \t } 
 
\t \t \t \t nav li{ 
 
\t \t \t \t \t list-style-type: none; 
 
\t \t \t \t \t border: 1px solid black; 
 
\t \t \t \t \t margin: 0px; 
 
\t \t \t \t } 
 
\t \t \t \t 
 
\t \t \t \t nav a{ 
 
\t \t \t \t \t text-decoration: none; 
 
\t \t \t \t \t font-weight: 700; 
 
\t \t \t \t } 
 
\t \t \t \t 
 
\t \t \t \t nav a, nav a:visited { 
 
\t \t \t \t \t color: green; 
 
\t \t \t \t }
<header> 
 
\t \t \t <h1>Somalia</h1> 
 
\t \t \t <nav id="headerNav"> 
 
\t \t \t \t <ul> 
 
\t \t \t \t \t <li><a href="index.html">Home</a></li> 
 
\t \t \t \t \t <li><a href="historyAndPolitics.html">History And Politics</a></li> 
 
\t \t \t \t \t <li><a href="Geography">Geography</a></li> 
 
\t \t \t \t \t <li><a href="economy.html">Economy</a></li> 
 
\t \t \t \t \t <li><a href="cultureAndDemographics.html">Culture And Demographics</a></li> 
 
\t \t \t \t </ul> 
 
\t \t \t </nav> 
 
\t \t </header> 
 
\t \t <article> 
 
\t \t <p> 
 
\t \t Somalia (/səˈmɑːliə, soʊ-, -ljə/ so-mah-lee-ə; Somali: Soomaaliya; Arabic: الصومال‎‎ aṣ-Ṣūmāl), 
 
\t \t officially the Federal Republic of Somalia[1] (Somali: Jamhuuriyadda Federaalka Soomaaliya, Arabic: 
 
\t \t <bdi>جمهورية الصومال الفيدرالية</bdi>‎‎ Jumhūrīyat aṣ-Ṣūmāl al-Fidirālīyah), is a country located in the 
 
\t \t Horn of Africa. It is bordered by Ethiopia to the west, Djibouti to the northwest, the Gulf of Aden to the 
 
\t \t north, the Indian Ocean to the east, and Kenya to the southwest. Somalia has the longest coastline on 
 
\t \t Africa's mainland, and its terrain consists mainly of plateaus, plains and highlands. Climatically, hot 
 
\t \t conditions prevail year-round, with periodic monsoon winds and irregular rainfall. 
 
\t \t </p> 
 
\t \t <p>Somalia has an estimated population of around 12.3 million. Around 85% of its residents are ethnic 
 
\t \t Somalis,[3] who have historically inhabited the northern part of the country. Ethnic minorities are largely 
 
\t \t concentrated in the southern regions. The official languages of Somalia are Somali and Arabic, both of 
 
\t \t which belong to the Afroasiatic family. Most people in the country are Muslim, with the majority being Sunni. 
 
\t \t </p> 
 

 
\t \t <p>In antiquity, Somalia was an important commercial centre. It is among the most probable locations of the 
 
\t \t fabled ancient Land of Punt. During the Middle Ages, several powerful Somali empires dominated the regional 
 
\t \t trade, including the Ajuran Empire, the Adal Sultanate, the Warsangali Sultanate, and the Geledi Sultanate. 
 
\t \t In the late 19th century, through a succession of treaties with these kingdoms, the British and Italian 
 
\t \t empires gained control of parts of the coast and established the colonies of British Somaliland and Italian 
 
\t \t Somaliland.[19][20] In the interior, Mohammed Abdullah Hassan's Dervish State repelled the British Empire 
 
\t \t four times and forced it to retreat to the coastal region, before succumbing to defeat in 1920 by British 
 
\t \t airpower.[22] The toponym Somalia was coined by the Italian explorer Luigi Robecchi Bricchetti (1855–1926). 
 
\t \t Italy acquired full control of the northeastern, central and southern parts of the area after successfully 
 
\t \t waging the so-called Campaign of the Sultanates against the ruling Majeerteen Sultanate and Sultanate of 
 
\t \t Hobyo.[20] Italian occupation lasted until 1941, yielding to British military administration. British 
 
\t \t Somaliland would remain a protectorate, while Italian Somaliland in 1949 became a United Nations 
 
\t \t Trusteeship under Italian administration, the Trust Territory of Somaliland. In 1960, the two regions 
 
\t \t united to form the independent Somali Republic under a civilian government.</p> 
 

 
\t \t <p>The Supreme Revolutionary Council seized power in 1969 and established the Somali Democratic Republic. 
 
\t \t Led by Mohamed Siad Barre, this government later collapsed in 1991 as the Somali Civil War broke out. 
 
\t \t Various armed factions began competing for influence in the power vacuum, particularly in the south. 
 
\t \t During this period, due to the absence of a central government, Somalia was a "failed state", and residents 
 
\t \t returned to customary and religious law in most regions. A few autonomous regions, including the 
 
\t \t Somaliland and Puntland administrations emerged in the north. The early 2000s saw the creation of fledgling 
 
\t \t interim federal administrations. The Transitional National Government (TNG) was established in 2000, 
 
\t \t followed by the formation of the Transitional Federal Government (TFG) in 2004, which reestablished 
 
\t \t national institutions such as the military. In 2006, the TFG, assisted by Ethiopian troops, 
 
\t \t assumed control of most of the nation's southern conflict zones from the newly formed Islamic Courts Union 
 
\t \t (ICU). The ICU subsequently splintered into more radical groups such as Al-Shabaab, which battled the TFG 
 
\t \t and its AMISOM allies for control of the region.</p> 
 

 
\t \t <p>By mid-2012, the insurgents had lost most of the territory that they had seized. In 2011–2012, a 
 
\t \t political process providing benchmarks for the establishment of permanent democratic institutions was 
 
\t \t launched. Within this administrative framework a new provisional constitution was passed in August 2012, 
 
\t \t which reformed Somalia as a federation.[29] Following the end of the TFG's interim mandate the same month, 
 
\t \t the Federal Government of Somalia, the first permanent central government in the country since the start 
 
\t \t of the civil war, was formed[30] and a period of reconstruction began in Mogadishu. Somalia has maintained 
 
\t \t an informal economy, mainly based on livestock, remittances from Somalis working abroad, and 
 
\t \t telecommunications</p> 
 
\t \t </article> 
 
\t \t <footer> 
 
\t \t \t <nav id="footerNav"> 
 
\t \t \t \t <ul> 
 
\t \t \t \t \t <li><a href="index.html">Home</a></li> 
 
\t \t \t \t \t <li><a href="historyAndPolitics.html">History And Politics</a></li> 
 
\t \t \t \t \t <li><a href="Geography">Geography</a></li> 
 
\t \t \t \t \t <li><a href="economy.html">Economy</a></li> 
 
\t \t \t \t \t <li><a href="cultureAndDemographics.html">Culture And Demographics</a></li> 
 
\t \t \t \t </ul> 
 
\t \t \t </nav> 
 

 
\t \t </footer
anzeigen 210

Verwandte Themen