Question

I have the following CSS:

@charset "utf-8"; 

html {height:100%;} 

body { 
height:100%; 
font: 100%/1.4 Verdana, Arial, Helvetica, sans-serif; 
margin: 0; 
padding: 0; 
color:#FFF; 
background-color: #2F2727; 
} 

#ribbon { 
position:absolute; 
top:0px; 
left:0px; 
height:150px; 
width:1400px; 
background-image:url(../Images/ribbon.... 
background-repeat:no-repeat; 
z-index:100; 
} 

/* ~~ this fixed width container surrounds all other divs~~ */ 
.container { 
height:100%; 
width: 960px; 
background-color: #FFF; 
margin: 0 auto; /* the auto value on the sides, coupled with the width, centers the layout */ 
overflow:hidden; 
} 

.sidebar1 { 
position:relative; 
top:180px; 
float: left; 
width: 180px; 
padding-bottom: 10px; 
color:#000; 
} 


.content { 
position:relative; 
top:170px; 
padding: 10px 0; 
padding-left:20px; 
width: 730px; 
float: left; 
color: #000; 
} 

This is a screenshot of the webpage. But the remaining text in the content class is hidden, how should I fix this?

Note: I tried to change the position of .content to absolute or inherit or fixed... it didnt work. If I remove overflow:hidden; the remaining text is shown on the blue background not the white one!!!

<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta http-equiv="cache-control" content="no-cache"/>
<title>title</title>
<link rel="shortcut icon" href="Images/icon.jpg" />
<link rel="stylesheet" type="text/css" href="CSS/main.css"/>

</head>

<body>
<div id='ribbon'></div><div class='container'><div class='sidebar1'><ul class='nav'><li><a href='#'>Home</a></li><li><a href='#'>dsgsg</a></li><li><a href='#'>Apply</a></li><li><a href='#'>sdf</a></li><li><a href='#'>About Us</a></li><li><a href='#'>Contact</a></li></ul><!-- end .sidebar1 --></div><div class='content'>    <h1>Helping students help themselves</h1>
    <p>Albert Einstein
From Wikipedia, the free encyclopedia
Albert Einstein
Einstein 1921 by F Schmutzer.jpg
Albert Einstein in 1921
Born    14 March 1879
Ulm, Kingdom of Württemberg, German Empire
Died    18 April 1955 (aged 76)
Princeton, New Jersey, United States
Residence   Germany, Italy, Switzerland, Austria, Belgium, United States
Citizenship 
Kingdom of Württemberg (1879–1896)
Stateless (1896–1901)
Switzerland (1901–1955)
Austria–Hungary (1911–1912)
German Empire (1914–1918)
Weimar Republic (1919–1933)
United States (1940–1955)
Fields  Physics
Institutions    
Swiss Patent Office (Bern)
University of Zurich
Charles University in Prague
ETH Zurich
Caltech
Prussian Academy of Sciences
Kaiser Wilhelm Institute
University of Leiden
Institute for Advanced Study
Alma mater  
ETH Zurich
University of Zurich
Thesis  Folgerungen aus den Capillaritatserscheinungen (1901)
Doctoral advisor    Alfred Kleiner
Other academic advisors Heinrich Friedrich Weber
Notable students    
Abdul Jabbar Abdullah
Ernst G. Straus
Nathan Rosen
Leó Szilárd
Raziuddin Siddiqui[1]
Known for   
General relativity and special relativity
Photoelectric effect
Mass-energy equivalence
Theory of Brownian Motion
Einstein field equations
Bose–Einstein statistics
Bose–Einstein condensate
Bose–Einstein correlations
Unified Field Theory
EPR paradox
Notable awards  
Nobel Prize in Physics (1921)
Matteucci Medal (1921)
Copley Medal (1925)[2]
Max Planck Medal (1929)
Time Person of the Century (1999)
Spouse  Mileva Marić (1903–1919)
Elsa Löwenthal (1919–1936)
Children    "Lieserl" (1902–1903?)
Hans Albert (1904–1973)
Eduard "Tete" (1910–1965)
Signature

Albert Einstein (/ˈælbərt ˈaɪnstaɪn/; German: [ˈalbɐt ˈaɪnʃtaɪn] ( ); 14 March 1879 – 18 April 1955) was a German-born theoretical physicist. He developed the general theory of relativity, one of the two pillars of modern physics (alongside quantum mechanics).[2][3] While best known for his mass–energy equivalence formula E = mc2 (which has been dubbed "the world's most famous equation"),[4] he received the 1921 Nobel Prize in Physics "for his services to theoretical physics, and especially for his discovery of the law of the photoelectric effect".[5] The latter was pivotal in establishing quantum theory.

Near the beginning of his career, Einstein thought that Newtonian mechanics was no longer enough to reconcile the laws of classical mechanics with the laws of the electromagnetic field. This led to the development of his special theory of relativity. He realized, however, that the principle of relativity could also be extended to gravitational fields, and with his subsequent theory of gravitation in 1916, he published a paper on the general theory of relativity. He continued to deal with problems of statistical mechanics and quantum theory, which led to his explanations of particle theory and the motion of molecules. He also investigated the thermal properties of light which laid the foundation of the photon theory of light. In 1917, Einstein applied the general theory of relativity to model the large-scale structure of the universe.[6]

He was visiting the United States when Adolf Hitler came to power in 1933 and did not go back to Germany, where he had been a professor at the Berlin Academy of Sciences. He settled in the U.S., becoming an American citizen in 1940.[7] On the eve of World War II, he endorsed a letter to President Franklin D. Roosevelt alerting him to the potential development of "extremely powerful bombs of a new type" and recommending that the U.S. begin similar research. This eventually led to what would become the Manhattan Project. Einstein supported defending the Allied forces, but largely denounced the idea of using the newly discovered nuclear fission as a weapon. Later, with the British philosopher Bertrand Russell, Einstein signed the Russell–Einstein Manifesto, which highlighted the danger of nuclear weapons. Einstein was affiliated with the Institute for Advanced Study in Princeton, New Jersey, until his death in 1955.

Einstein published more than 300 scientific papers along with over 150 non-scientific works.[6][8] His great intellectual achievements and originality have made the word "Einstein" synonymous with genius.[9]

Contents
1 Biography
1.1 Early life and education
1.2 Marriages and children
1.3 Patent office
1.4 Academic career
1.5 Travels abroad
1.6 Emigration to U.S. in 1933
1.6.1 World War II and the Manhattan Project
1.6.2 US citizenship
1.7 Death
2 Scientific career
2.1 1905 – Annus Mirabilis papers
2.2 Thermodynamic fluctuations and statistical physics
2.3 General principles
2.4 Theory of relativity and E = mc²
2.5 Photons and energy quanta
2.6 Quantized atomic vibrations
2.7 Adiabatic principle and action-angle variables
2.8 Wave–particle duality
2.9 Theory of critical opalescence
2.10 Zero-point energy
2.11 General relativity and the equivalence principle
2.12 Hole argument and Entwurf theory
2.13 Cosmology
2.14 Modern quantum theory
2.15 Bose–Einstein statistics
2.16 Energy momentum pseudotensor
2.17 Unified field theory
2.18 Wormholes
2.19 Einstein–Cartan theory
2.20 Equations of motion
2.21 Other investigations
2.22 Collaboration with other scientists
2.22.1 Einstein–de Haas experiment
2.22.2 Schrödinger gas model
2.22.3 Einstein refrigerator
2.23 Bohr versus Einstein
2.24 Einstein–Podolsky–Rosen paradox
3 Political and religious views
4 Love of music
5 Non-scientific legacy
6 In popular culture
7 Awards and honors
8 Publications
9 See also
10 Notes
11 References
12 Further reading
13 External links
Biography
Early life and education
See also: Einstein family
A young boy with short hair and a round face, wearing a white collar and large bow, with vest, coat, skirt and high boots. He is leaning against an ornate chair.
Einstein at the age of three in 1882
Studio photo of a boy seated in a relaxed posture and wearing a suit, posed in front of a backdrop of scenery.
Albert Einstein in 1893 (age 14)
Einstein's matriculation certificate at the age of 17. The heading reads "The Education Committee of the Canton of Aargau." His scores were German 5, French 3, Italian 5, History 6, Geography 4, Algebra 6, Geometry 6, Descriptive Geometry 6, Physics 6, Chemistry 5, Natural History 5, Art Drawing 4, Technical Drawing 4. The scores are 6 = excellent, 5 = good, 4 = sufficient, 3 = poor, 2 = very poor, 1 = unusable.
Einstein's matriculation certificate at the age of 17, showing his final grades from the Aargau Kantonsschule (on a scale of 1-6, with 6 being the best mark).
Albert Einstein was born in Ulm, in the Kingdom of Württemberg in the German Empire on 14 March 1879.[10] His father was Hermann Einstein, a salesman and engineer. His mother was Pauline Einstein (née Koch). In 1880, the family moved to Munich, where his father and his uncle founded Elektrotechnische Fabrik J. Einstein & Cie, a company that manufactured electrical equipment based on direct current.[10]

The Einsteins were non-observant Ashkenazi Jews. Albert attended a Catholic elementary school from the age of five for three years. At the age of eight, he was transferred to the Luitpold Gymnasium (now known as the Albert Einstein Gymnasium), where he received advanced primary and secondary school education until he left Germany seven years later.[11] Contrary to popular suggestions that he had struggled with early speech difficulties, the Albert Einstein Archives indicate he excelled at the first school that he attended.[12] He was right-handed;[12][13] there appears to be no evidence for the widespread popular belief[14] that he was left-handed.

His father once showed him a pocket compass; Einstein realized that there must be something causing the needle to move, despite the apparent "empty space".[15] As he grew, Einstein built models and mechanical devices for fun and began to show a talent for mathematics.[10] When Einstein was ten years old, Max Talmud (later changed to Max Talmey), a poor Jewish medical student from Poland, was introduced to the Einstein family by his brother. During weekly visits over the next five years, he gave the boy popular books on science, mathematical texts and philosophical writings. These included Immanuel Kant's Critique of Pure Reason, and Euclid's Elements (which Einstein called the "holy little geometry book").[16][17][fn 1].</p>

    <!-- end .content --></div>

  <!-- end .container --></div>


</body>

</html>
Was it helpful?

Solution

Because you have overflow:hidden set, any and all content that flows outside of the element's bounds is cut off.

You probably are looking for overflow:auto, which allows the container to scroll when the content exceeds the bounds.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top