2016-11-30 2 views
0

Ich habe eine kleine Website mit nur HTML, CSS und Jquery erstellt. Kein bootstrap ...So erhalten Sie Abschnitte zu 100% Browser-Länge

Ausgabe: Meine Bilder und Divs zeigen nicht 100% Browser-Breite. Ich habe eine weiße Grenze, die um meine Website herumgeht. Jedes Div hat ein Bild als Hintergrund. Ich habe versucht, es zu sagen 100% in der CSS, aber ich habe nur den Finger.

OZON DIV:

<!-- OZONE SECTION 
    =============================================== --> 
    <section id="ozone"> 
     <div class="ozone_module"> 
      <h2>The link between Ozone depletion and Climate Change</h2> 
      <p>Atmospheric ozone has two effects on the temperature balance of the Earth. It absorbs solar ultraviolet radiation, which heats the stratosphere. It also absorbs infrared radiation emitted by the Earth's surface, effectively trapping heat in the troposphere. Therefore, the climate impact of changes in ozone concentrations varies with the altitude at which these ozone changes occur. The major ozone losses that have been observed in the lower stratosphere due to the human-produced chlorine- and bromine-containing gases have a cooling effect on the Earth's surface. On the other hand, the ozone increases that are estimated to have occurred in the troposphere because of surface-pollution gases have a warming effect on the Earth's surface, thereby contributing to the "greenhouse" effect.</p> 

      <p> the increase in carbon dioxide is the major contributor to climate change. Carbon dioxide concentrations are increasing in the atmosphere primarily as the result of the burning of coal, oil, and natural gas for energy and transportation. The atmospheric abundance of carbon dioxide is currently about 30% above what it was 150 years ago.</p> 

      <p>There is an additional factor that indirectly links ozone depletion to climate change; namely, many of the same gases that are causing ozone depletion are also contributing to climate change. These gases, such as the chlorofluorocarbons (CFCs), are greenhouse gases, absorbing some of the infrared radiation emitted by the Earth's surface, thereby effectively heating the Earth's surface.</p> 

      <p>Conversely, changes in the climate of the Earth could affect the behavior of the ozone layer, because ozone is influenced by changes in the meteorological conditions and by changes in the atmospheric composition that could result from climate change. The major issue is that the stratosphere will most probably cool in response to climate change, therefore preserving over a longer time period the conditions that promote chlorine-caused ozone depletion in the lower stratosphere, particularly in polar regions.</p> 

      <a class="source" href="http://www.esrl.noaa.gov/csd/assessments/ozone/1998/faq9.html" target="_blank"><h4>National Oceanic and Atmospheric Administration </h4></a> 

     </div> 
    </section><!-- ozone --> 

OZON CSS:

/* OZONE */ 
#ozone { 
    background: url('../img/NASA_ozone.jpg') 50% 0 no-repeat fixed; 
    min-height: 800px; 
    padding: 40px 0px; 
    -webkit-background-size: cover; 
    -moz-background-size: cover; 
    -o-background-size: cover; 
    background-size: cover; 
} 

.ozone_module { 
    border-radius: 15px; 
    background: rgba(255, 255, 255, 0.75); 
    opacity: .9;  
    padding: 2px 8px; 
    color: black; 
    margin-left: 60%; 
    margin-top: 50px; 
    margin-right: 15px; 
    font: 14px Sans-Serif; 
} 
+0

Bitte lesen Sie [fragen], vor allem das bisschen über das Erstellen eines nützlichen Titels: * Schreiben Sie einen Titel, der die SP zusammenfasst ezifisches Problem * –

+0

Wo bekommen Sie diese Grenzen? –

+0

Überprüfen Sie die Ränder bei 'Körper'. du könntest ein paar 'margin's oder 'padding's haben –

Antwort

1

In den meisten gängigen Browsern, die Standard-Marge ist 8px auf allen Seiten. Es wird in Pixel vom User-Agent-Stylesheet Ihres Browsers definiert.

Versuchen Sie es mit,

body 
{ 
    margin:0; 
} 
+0

ich definiere über dieses dachte ich lol. – F0xcr4f7

+0

Was ist passiert? Hat es nicht funktioniert? –

+0

Es hat funktioniert. Ich habe etwas so leichtes verpasst. Danke für die Hilfe! – F0xcr4f7

0

Sie wahrscheinlich jede Standard-Polsterung und Margen aus dem Körper entfernen müssen:

body { 
    padding: 0; 
    margin: 0; 
} 

/* OZONE */ 
 

 
body { 
 
    padding: 0; 
 
    margin: 0; 
 
} 
 
#ozone { 
 
    background: url('http://placekitten.com/g/800/600 ') 50% 0 no-repeat fixed; 
 
    min-height: 800px; 
 
    padding: 40px 0px; 
 
    -webkit-background-size: cover; 
 
    -moz-background-size: cover; 
 
    -o-background-size: cover; 
 
    background-size: cover; 
 
} 
 
.ozone_module { 
 
    border-radius: 15px; 
 
    background: rgba(255, 255, 255, 0.75); 
 
    opacity: .9; 
 
    padding: 2px 8px; 
 
    color: black; 
 
    margin-left: 60%; 
 
    margin-top: 50px; 
 
    margin-right: 15px; 
 
    font: 14px Sans-Serif; 
 
}
<section id="ozone"> 
 
    <div class="ozone_module"> 
 
    <h2>The link between Ozone depletion and Climate Change</h2> 
 
    <p>Atmospheric ozone has two effects on the temperature balance of the Earth. It absorbs solar ultraviolet radiation, which heats the stratosphere. It also absorbs infrared radiation emitted by the Earth's surface, effectively trapping heat in the troposphere. 
 
     Therefore, the climate impact of changes in ozone concentrations varies with the altitude at which these ozone changes occur. The major ozone losses that have been observed in the lower stratosphere due to the human-produced chlorine- and bromine-containing 
 
     gases have a cooling effect on the Earth's surface. On the other hand, the ozone increases that are estimated to have occurred in the troposphere because of surface-pollution gases have a warming effect on the Earth's surface, thereby contributing 
 
     to the "greenhouse" effect.</p> 
 

 
    <p>the increase in carbon dioxide is the major contributor to climate change. Carbon dioxide concentrations are increasing in the atmosphere primarily as the result of the burning of coal, oil, and natural gas for energy and transportation. The atmospheric 
 
     abundance of carbon dioxide is currently about 30% above what it was 150 years ago.</p> 
 

 
    <p>There is an additional factor that indirectly links ozone depletion to climate change; namely, many of the same gases that are causing ozone depletion are also contributing to climate change. These gases, such as the chlorofluorocarbons (CFCs), are 
 
     greenhouse gases, absorbing some of the infrared radiation emitted by the Earth's surface, thereby effectively heating the Earth's surface.</p> 
 

 
    <p>Conversely, changes in the climate of the Earth could affect the behavior of the ozone layer, because ozone is influenced by changes in the meteorological conditions and by changes in the atmospheric composition that could result from climate change. 
 
     The major issue is that the stratosphere will most probably cool in response to climate change, therefore preserving over a longer time period the conditions that promote chlorine-caused ozone depletion in the lower stratosphere, particularly in 
 
     polar regions.</p> 
 

 
    <a class="source" href="http://www.esrl.noaa.gov/csd/assessments/ozone/1998/faq9.html" target="_blank"><h4>National Oceanic and Atmospheric Administration </h4></a> 
 

 
    </div> 
 
</section> 
 
<!-- ozone -->

+0

Die '' hat keine Standardauffüllung, nur Rand. – Aaron