I'd like to achieve something similar to the picture below (2 icons, mail and phone outside my Article DIV (in white on the image), aligned to the top of the DIV and under each other (with 1 or 2 pixels space). I tried to set a class with a negative margin for the images but without success. What would be the best way to achieve this?
Many thanks
.article {
clear: right;
float: right;
text-align:justify;
width: 450px;
min-height:420px;
height: 60%;
padding: 50px 32px 49px 62px;
margin-right:75px;
position: relative;
z-index: 15;
margin-top: 90px;
background: #fff;
/* max-width: 25%; */
overflow-y: scroll!important;
}
I would use position: relative on the article and position: absolute positioning on the icon set (I used a ul for simplicity):
JSFiddle: http://jsfiddle.net/szLsH/
HTML code:
<article>
<div id="icons">
<ul>
<li></li>
<li></li>
</ul>
</div>
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam ac libero velit. Proin euismod erat non diam malesuada ac semper purus dapibus. Donec id suscipit metus. Ut eu auctor mauris. Proin sed felis dui. Maecenas congue dapibus dolor, sodales feugiat nisi feugiat ac. Nulla nec massa in mi pharetra sollicitudin. Aliquam eu dui quis odio porttitor viverra ut cursus dui. Nullam quis tristique magna. Aliquam erat volutpat. Suspendisse potenti. Pellentesque rhoncus commodo odio vitae tincidunt. Praesent rutrum, nibh vitae porta luctus, felis quam dignissim risus, non tempus lectus magna non odio. Donec commodo laoreet dolor ut volutpat. Ut lobortis lobortis augue, in placerat arcu dapibus et. Maecenas vitae lectus quis enim suscipit euismod.
</p>
</article>
CSS:
article {
width: 200px;
margin: 0 auto;
position: relative;
padding: 10px;
border: 1px solid #AAA;
}
#icons {
position: absolute;
right: 100%;
top: 0;
}
#icons ul {
margin: 0;
padding: 0;
list-style-type: none;
}
#icons li {
width: 50px;
height: 50px;
background: blue;
margin: 0 5px 5px;
}
Related
I need to create a website (two columns) where one column contains some text (vertical centered) and the other column contains a picture (sticky to bottom).
Both of them need to be responsive (so position: fixed is not an option for the image).
I tried to achieve this by using Bootstrap and the w3 responsive framework. But both of them seem unable to put a responsive image inside a column that is always stuck to the bottom.
Any tips on how I can achieve this layout while being responsive (Picture needs to resize etc)?
Here's a solution without using flex. It's completely responsive and can be scaled both horizontally and vertically.
body {
margin: 0;
padding: 0;
}
#container {
width: 100%;
height: 100vh;
overflow: hidden;
}
#column1 {
position: relative;
width: calc(50% - 4px);
height: calc(100% - 4px);
display: inline-block;
border: 2px solid black;
}
#column1 span {
display: block;
position: relative;
top: 50%;
transform: translateY(-50%);
padding: 10px;
}
#column2 {
position: relative;
top: -50%;
left: 50%;
width: calc(50% - 2px);
height: calc(50% - 4px);
display: inline-block;
border: 2px solid black;
border-left: none;
}
<div id="container">
<div id="column1">
<span>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus interdum bibendum laoreet. Suspendisse eu mauris urna. Vestibulum vel blandit erat. Suspendisse egestas semper urna in convallis. Aliquam lobortis, leo nec pharetra semper, elit risus aliquet metus, non malesuada massa turpis tincidunt lectus. Fusce pellentesque metus ac lectus ultricies, et fermentum tellus fringilla.</span>
</div>
<footer id="column2"></footer>
</div>
Here's a quick example of how you can achieve it with flex.
/* Std */
body {
margin: 0;
width: 100%;
height: 100%;
}
/* Flex Classes */
.flex {
display: flex;
}
.flex--row {
flex-direction: row;
}
/* Column Classes */
.column {
position: relative;
min-height: 100vh;
}
.left-column {
flex: 0.7;
background: red;
}
.right-column {
flex: 0.3;
background: blue;
}
/* Picture */
#column-picture {
width: 100%;
height: inherit;
position: absolute;
bottom: 0;
}
<div class="flex flex--row">
<div class="column left-column">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Curabitur lacinia auctor tincidunt. Sed a turpis et eros iaculis convallis quis in nisl. Donec fringilla auctor eros ut ultrices. Donec laoreet dui urna, ut pharetra neque molestie et. Ut sagittis diam a lacus euismod dignissim. Sed vulputate dui erat, at hendrerit ante commodo et. Sed gravida ex et est bibendum pretium. Aliquam a convallis dui. Maecenas magna velit, ultrices eu massa sit amet, dictum accumsan tellus. Maecenas eget placerat magna. Nullam mollis lacus tempor lorem tempor tincidunt. Aliquam erat volutpat.
</div>
<div class="column right-column">
<img id="column-picture" alt="Lion" src="https://cbs.umn.edu/sites/cbs.umn.edu/files/public/african_lion_king-wide.jpg"/>
</div>
</div>
Tell me what you think of this. #Mech
https://codepen.io/rickydam/pen/zdrmWX
HTML
<div class="left">
<div class="innerleft">
<p>
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus interdum bibendum laoreet. Suspendisse eu mauris urna. Vestibulum vel blandit erat. Suspendisse egestas semper urna in convallis. Aliquam lobortis, leo nec pharetra semper, elit risus aliquet metus, non malesuada massa turpis tincidunt lectus. Fusce pellentesque metus ac lectus ultricies, et fermentum tellus fringilla. Phasellus vel quam a sem elementum volutpat vel eget neque. Nam efficitur maximus risus, ac eleifend augue tempor rutrum. Fusce vehicula non lorem vitae blandit. Donec in scelerisque sem, quis congue velit.
</p>
</div>
</div><!--
--><div class="right">
<img src="http://www.uniwallpaper.com/static/images/Sunset-Village-Wallpaper_8I7ogbf.jpg">
</div>
CSS
.left {
width: 50%;
height: 100vh;
background-color: lightgray;
display: inline-block;
vertical-align: middle;
margin: auto;
}
.innerleft {
background-color: lightblue;
height: 100vh;
display: flex;
align-items: center;
}
.left p {
margin: 20px;
padding: 10px;
background-color: gray;
}
.right {
width: 50%;
height: 100vh;
background-color: slategray;
display: inline-block;
vertical-align: top;
position: relative;
}
.right img {
position: absolute;
bottom: 0;
max-width: 100%;
}
My HTML structure shows a paragraph first and then a graphics at the bottom. Using CSS, I want to show the graphics at the top and paragraph at the bottom. The paragraph will be dynamic so the height is not fixed. I can't figure out how to solve the issue.
This my code:
.centerDiv {
width: 500px;
margin: 0 auto;
}
.topDiv {
display: inline-block;
width: 460px;
vertical-align: top;
}
.bottomDiv {
display: inline-block;
width: 460px;
height: 100px;
background-color: #ff0000;
vertical-align: top;
}
<div class="centerDiv">
<div>
<div class="topDiv">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut pharetra vel risus sed ultricies. Nulla vitae arcu dolor. Integer ut ex dapibus, malesuada urna maximus, laoreet tellus. Sed enim massa, elementum nec ultrices nec, pellentesque tristique
nibh. Donec dignissim facilisis dui, eu porttitor ante. Fusce posuere convallis augue, sed ultricies massa finibus vel.</div>
<div class="bottomDiv">Graphic</div>
</div>
</div>
If the Graphic has a fixed height you can achieve that using positioning
see the code bellow
.centerDiv {
width: 500px;
margin: 0 auto;
}
/* added code */
.centerDiv>div {
position: relative;
padding-top: 100px; /* padding value equals to bottomDiv's height*/
}
/*---------------*/
.topDiv {
display: inline-block;
width: 460px;
}
.bottomDiv {
display: inline-block;
width: 460px;
height: 100px;
background-color: #ff0000;
/* added code */
position: absolute;
top: 0;
left: 0;
/*---------*/
}
<div class="centerDiv">
<div>
<div class="topDiv">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut pharetra vel risus sed ultricies. Nulla vitae arcu dolor. Integer ut ex dapibus, malesuada urna maximus, laoreet tellus. Sed enim massa, elementum nec ultrices nec, pellentesque tristique
nibh. Donec dignissim facilisis dui, eu porttitor ante. Fusce posuere convallis augue, sed ultricies massa finibus vel.</div>
<div class="bottomDiv">Graphic</div>
</div>
</div>
Or you can use flex-direction: column-reverse; which reverses the order of the div children
But this may not be supported in some browsers
.centerDiv {
width: 500px;
margin: 0 auto;
}
.centerDiv>div {
display: flex;
flex-direction: column-reverse;
}
.topDiv {
display: inline-block;
width: 460px;
}
.bottomDiv {
display: inline-block;
width: 460px;
height: 100px;
background-color: #ff0000;
}
<div class="centerDiv">
<div>
<div class="topDiv">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Ut pharetra vel risus sed ultricies. Nulla vitae arcu dolor. Integer ut ex dapibus, malesuada urna maximus, laoreet tellus. Sed enim massa, elementum nec ultrices nec, pellentesque tristique
nibh. Donec dignissim facilisis dui, eu porttitor ante. Fusce posuere convallis augue, sed ultricies massa finibus vel.</div>
<div class="bottomDiv">Graphic</div>
</div>
</div>
The screenshot above shows the problem. Unlike the other similar question I don't need this to work for international text. I need this to work for varying screen sizes and varying amounts of text. The text will come from a databse in production, so I can't simply figure out the breakpoint at which the div needs to move down in advance.
The solution I am looking for would first move the text block below the image, and then resize the text div vertically as necessary to accomidate all the text. JS or CSS solutions are fine.
HTML below:
<div class="product">
<img class="productImg" src="http://placehold.it/300x240">
<div class="productTxt">
<h1>Title</h1>
<h3>Price</h3>
<p>Suspendisse sed fermentum neque, vel rutrum velit. Curabitur eget dolor luctus, sodales felis sed, dapibus justo.
Suspendisse in condimentum ante. Sed nec dui tristique, sollicitudin velit eget, ultricies dui.
Ut rhoncus ornare urna, quis venenatis velit ornare eu. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas.
Etiam ornare sem finibus lectus volutpat, in feugiat elit ultrices. In sed vulputate eros, quis volutpat elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Suspendisse nisi libero, posuere nec laoreet quis, viverra et lorem. Duis odio ante, efficitur et felis at, tincidunt interdum ante.
Quisque vestibulum eu est a egestas. Nunc hendrerit rutrum dui at cursus. Aliquam mollis nec magna ac mattis.
Nam nec est tincidunt leo facilisis finibus non nec mauris. Vestibulum rutrum tristique tincidunt. </p>
</div>
</div>
CSS:
.product {
box-sizing: border-box;
margin: 0px;
padding: 10px;
width: 100%;
height: 330px;
border-bottom: 2px solid #16A085;
}
.productImg {
width: 240px;
height: 300px;
display: inline-block;
position: relative;
}
.productTxt {
box-sizing: border-box;
vertical-align: top;
display: inline-block;
height: 100%;
width: calc(100% - 270px);
padding: 10px;
text-align: center;
position: relative;
border: 2px solid blue;
}
I can't really remove the relative positioning from the productTxt div without breaking the positioning of another element that is within the same div (which I have removed for simplicity in this example)
Remove the fixed height in of parent div .product and add a min-width to .productTxt. If you use 100% for width or height, it's relative to the parent div, and you must specifically set the parent's width or height. That's why your height: 100% on .productTxt was not changing based on your content and was fixed to parent div .product's height: 330px.
.product {
box-sizing: border-box;
margin: 0px;
padding: 10px;
width: 100%;
border-bottom: 2px solid #16A085;
}
.productTxt {
box-sizing: padding-box;
vertical-align: top;
display: inline-block;
height: 100%;
width: calc(100% - 270px);
min-width: 220px; /* change this to what you want */
padding: 10px;
text-align: center;
position: relative;
border: 2px solid blue;
}
To move the text block below the image remove display: inline-block; from .productTxt class.
If you want to keep the height of .product class fix then adjust height of .productTxt according to .product class and give css overflow: auto; to .productTxt all you data will displayed with scroll panel,so your HTML is
<div class="product">
<img class="productImg" src="http://placehold.it/300x240">
<div class="productTxt">
<h1>Title</h1>
<h3>Price</h3>
<p>Suspendisse sed fermentum neque, vel rutrum velit.
Curabitur eget dolor luctus, sodales felis sed, dapibus
justo.Suspendisse in condimentum ante. Sed nec dui
tristique,sollicitudin velit eget, ultricies dui.
Ut rhoncus ornare urna, quis venenatis velit ornare eu.
Pellentesque habitant morbi tristique senectus et netus et
malesuada fames ac turpis egestas.
Etiam ornare sem finibus lectus volutpat, in feugiat elit
ultrices. In sed vulputate eros, quis volutpat elit.
Lorem ipsum dolor sit amet, consectetur adipiscing elit.
Suspendisse nisi libero, posuere nec laoreet quis, viverra
et lorem. Duis odio ante, efficitur et felis at, tincidunt
interdum ante.
Quisque vestibulum eu est a egestas. Nunc hendrerit rutrum
dui at cursus. Aliquam mollis nec magna ac mattis.
Nam nec est tincidunt leo facilisis finibus non nec
mauris.Vestibulum rutrum tristique tincidunt.
</p>
</div>
</div>
And your CSS will be
.product {
box-sizing: border-box;
margin: 0px;
padding: 10px;
width: 100%;
height: 550px;
border-bottom: 2px solid #16A085;
}
.productImg {
width: 240px;
height: 300px;
display: inline-block;
position: relative;
}
.productTxt {
box-sizing: border-box;
vertical-align: top;
height: 230px;
width: calc(100% - 270px);
padding: 10px;
text-align: center;
position: relative;
border: 2px solid blue;
overflow: auto;
}
My problem is that I cannot center this image. I've tried margin: 0 and absolute positions but nothing seem to work. I'm kind of a rookie when it comes to html and css. I've cleared my tries to center it from the html and css.
I want the image to be centered even when the site window width changes so padding does not work.
This is my CSS
/* image and text setup container */
.container {
float: left;
position: relative;
width: 100%;
left: 0%;
right: 0%;
}
.imagetext {
text-align: left;
width: 5%;
position: absolute;
top: 8px;
right: 60px;
font-size: 18px;
}
img {
padding-right: 5px;
padding-right: 5px;
padding-bottom: 15px;
}
HTML
<!--Front page image and text-->
<div class="container">
<img src="Aberlady_Church.png" alt="Church" width="400" height="200">
<div class="imagetext">Hasellus tempus pretium efficitur mauris non magna volutpat
</div>
</div>
At the moment, the image looks like this: http://puu.sh/o706W/ed57f22e12.jpg
You can try something like this
<!--Front page image and text-->
<div class="container">
<figure>
<img src="http://lorempicsum.com/futurama/350/200/1" alt="Church" width="400" height="200">
<div class="imagetext">Hasellus tempus pretium efficitur mauris non magna volutpat
</div>
</figure>
</div>
CSS
/* image and text setup container */
.container {
position: relative;
width: 100%;
}
.imagetext {
text-align: left;
width: 5%;
position: absolute;
top: 8px;
color: #fff;
right: 80px;
font-size: 18px;
}
figure { position: relative; width: 400px; margin: auto; /* the width of your image */}
img {
padding-right: 5px;
padding-right: 5px;
padding-bottom: 15px;
}
I've added a figure and position the text in absolute position relative to this tag instead of the .container
Generally speaking, you are looking for
margin-left: auto;
margin-right: auto;
to horizontally centre a block level element within its container.
Please aware though, that you will complicate matters by adding float and position to its containing block, so try to avoid those unless you really need them.
I would try the following styles for that markup.
.container {
width: 100%;
}
.imagetext {
width: 5%;
font-size: 18px;
margin:0;
}
img {
margin:0;
padding-right: 5px;
padding-right: 5px;
padding-bottom: 15px;
}
You have a lot of errors and excess code. I recomend you to read some books about HTML, CSS to upgrade your level.
Here's an example of simply solve of your problem with minimum code. We add image wrapper .image_wrapper, that centered images and text inside it.
CSS
.image_wrapper {
text-align: center;
}
.imagetext {
font-size: 18px;
}
img {
padding: 5px;
}
HTML
<div class="container">
<div class="image_wrapper">
<img src="http://www.theimaginativeconservative.org/wp-content/uploads/2016/02/Pretty-Church.jpg" alt="Church" width="400" height="200" />
<div class="imagetext">Hasellus tempus pretium efficitur mauris non magna volutpat</div>
</div>
</div>
Check it.
https://jsfiddle.net/r1rh7wn4/
You might want to consider wrapping your image and it's associated text in a <div> to separate it from the rest of the page text. This will also allow you to center both elements, regardless of page width. Here's an example:
https://jsfiddle.net/Bendrick92/gyc2n5o5/
.container {
float: left;
position: relative;
width: 100%;
left: 0%;
right: 0%;
}
.imagecontainer {
width: 75%;
height: auto;
margin: 0 auto;
position: relative;
}
.imagecontainer img {
width: 100%;
height: auto;
padding-right: 5px;
padding-right: 5px;
padding-bottom: 15px;
}
.imagecontainer .imagetext {
width: 20%;
height: 100%;
position: absolute;
top: 0;
right: 0;
}
<div class="container">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam at massa nunc. Aenean in ullamcorper dui. Cras sodales, enim at dapibus rhoncus, nisi nulla dapibus erat, sit amet mattis ipsum enim at felis. Donec ex orci, venenatis eu feugiat sit amet, blandit eget orci. Curabitur accumsan orci massa, vitae dictum eros facilisis nec. Aenean imperdiet urna sem. Vivamus venenatis sit amet ligula id auctor. Nunc erat purus, tincidunt at ex eleifend, aliquet feugiat sem. Nullam euismod magna in diam consequat iaculis. Nam scelerisque quam ullamcorper consectetur consectetur. Etiam interdum orci sollicitudin ornare dictum.</p>
<div class="imagecontainer">
<img src="http://www.topsailunitedchurch.nf.net/images/Church2.jpg" alt="Church" />
<div class="imagetext">Hasellus tempus pretium efficitur mauris non magna volutpat</div>
</div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam at massa nunc. Aenean in ullamcorper dui. Cras sodales, enim at dapibus rhoncus, nisi nulla dapibus erat, sit amet mattis ipsum enim at felis. Donec ex orci, venenatis eu feugiat sit amet, blandit eget orci. Curabitur accumsan orci massa, vitae dictum eros facilisis nec. Aenean imperdiet urna sem. Vivamus venenatis sit amet ligula id auctor. Nunc erat purus, tincidunt at ex eleifend, aliquet feugiat sem. Nullam euismod magna in diam consequat iaculis. Nam scelerisque quam ullamcorper consectetur consectetur. Etiam interdum orci sollicitudin ornare dictum.</p>
</div>
Or if you'd like the image text to be centered below the image:
https://jsfiddle.net/Bendrick92/gyc2n5o5/1/
.container {
float: left;
position: relative;
width: 100%;
left: 0%;
right: 0%;
}
.imagecontainer {
width: 75%;
height: auto;
margin: 0 auto;
position: relative;
}
.imagecontainer img {
width: 100%;
height: auto;
padding-right: 5px;
padding-right: 5px;
padding-bottom: 15px;
}
.imagecontainer .imagetext {
width: 100%;
height: 100%;
position: relative;
text-align: center;
}
<div class="container">
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam at massa nunc. Aenean in ullamcorper dui. Cras sodales, enim at dapibus rhoncus, nisi nulla dapibus erat, sit amet mattis ipsum enim at felis. Donec ex orci, venenatis eu feugiat sit amet, blandit eget orci. Curabitur accumsan orci massa, vitae dictum eros facilisis nec. Aenean imperdiet urna sem. Vivamus venenatis sit amet ligula id auctor. Nunc erat purus, tincidunt at ex eleifend, aliquet feugiat sem. Nullam euismod magna in diam consequat iaculis. Nam scelerisque quam ullamcorper consectetur consectetur. Etiam interdum orci sollicitudin ornare dictum.</p>
<div class="imagecontainer">
<img src="http://www.topsailunitedchurch.nf.net/images/Church2.jpg" alt="Church" />
<div class="imagetext">Hasellus tempus pretium efficitur mauris non magna volutpat</div>
</div>
<p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Etiam at massa nunc. Aenean in ullamcorper dui. Cras sodales, enim at dapibus rhoncus, nisi nulla dapibus erat, sit amet mattis ipsum enim at felis. Donec ex orci, venenatis eu feugiat sit amet, blandit eget orci. Curabitur accumsan orci massa, vitae dictum eros facilisis nec. Aenean imperdiet urna sem. Vivamus venenatis sit amet ligula id auctor. Nunc erat purus, tincidunt at ex eleifend, aliquet feugiat sem. Nullam euismod magna in diam consequat iaculis. Nam scelerisque quam ullamcorper consectetur consectetur. Etiam interdum orci sollicitudin ornare dictum.</p>
</div>
You actually just need to apply a "display:block;" + "margin:0 auto;" to your image.
/* image and text setup container */
.container {
float: left;
position: relative;
width: 100%;
left: 0%;
right: 0%;
}
.imagetext {
text-align: left;
width: 5%;
position: absolute;
top: 8px;
right: 60px;
font-size: 18px;
}
img {
/* add this to make it center */
display:block;
margin:0 auto;
/* add this to make it center */
padding-right: 5px;
padding-right: 5px;
padding-bottom: 15px;
}
<div class="container">
<img src="Aberlady_Church.png" alt="Church" width="400" height="200">
<div class="imagetext">Hasellus tempus pretium efficitur mauris non magna volutpat
</div>
This question already has answers here:
Fixed position but relative to container
(31 answers)
Closed 8 years ago.
I'm building a web page that will have a fixed header. Currently the fixed header is not staying in it's parent at width: 100% and it its hiding behind the content on the page. I understand position:fixed takes the element out the normal flow of things, but I'm not sure how to fix this. I'm looking for a fix that will be have well resizing to different screen sizes. Here's my jsfiddle http://jsfiddle.net/claireC/7hnbc/1/ and codes below
html:
<header>
<nav>
<p class="navLinks navFloat">link</p>
<a class="navLinks" href="#">link</a>
<p class="navLinks">link</p>
</nav>
</header>
<div class="content">
<p class="aboutMe">
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Pellentesque eget eros ut quam mollis dignissim. Nullam ultrices nisl vitae urna adipiscing vulputate. Sed ut ligula quam. Aenean lorem nunc, vulputate eget nisi ut, blandit feugiat dui. Aliquam tempor ornare felis at venenatis. Vivamus vel pulvinar turpis, vitae imperdiet nunc. Nulla purus leo, euismod eget velit eu, rutrum commodo sem. Ut eleifend sem sed purus pharetra lacinia. Donec id lacus sodales erat interdum pharetra non at purus. Proin dignissim est at leo volutpat venenatis. Phasellus pellentesque turpis vel velit blandit, non egestas purus hendrerit. Pellentesque eget massa at nisl lobortis tempor. Cras orci tellus, egestas a mauris sit amet, consectetur euismod lorem. Suspendisse faucibus odio quis leo fringilla, hendrerit hendrerit tortor luctus. Integer quis pulvinar lacus.
</p>
</div>
</div>
css:
html, body{
height: 100%;
}
body{
position: relative;
font-family: Helvetica;
}
.wrapper{
margin: 0 auto;
min-height: 100%;
width: 1280px;
background-color: red;
}
header{
position: fixed;
top: 0;
background-color: red;
width: 100%;
overflow: auto;
}
nav{
width: 376px;
margin: 0 auto;
background-color: #000;
overflow: auto;
}
.navLinks{
display: inline-block;
}
.content{
position: relative;
background-color: blue;
padding-bottom: 226px;
text-align: center;
}
.aboutMe{
font-size: 50px;
margin: 0 auto;
width: 676px;
}
a{
text-decoration: underline;
}
Could you maybe discribe the problem a bit better? Works fine for me, did you try it in multiple browsers?
May it be because you haven't set a z-index?
EDIT:
Adding a z-index to the Header worked for me:
header{
position: fixed;
top: 0;
background-color: red;
width: 100%;
overflow: auto;
z-index: 999;
}