Reputation: 3
http://codepen.io/anon/pen/potcD
In the header css, why is it that when I add position: fixed the symposiums text goes all the way to the left?
Upvotes: 0
Views: 156
Reputation: 12127
I am not sure what you are trying to do.
I've played with it a bit... Please check out my CodePen fork of your work.
HTML
<header><div class="logo">symposiums</div></header>
<div class="content">
<p>
1.a convivial meeting, usually following a dinner, for drinking and intellectual conversation.<br>
2.( initial capital letter, italics ) a philosophical dialogue (4th century b.c.) by Plato, dealing with ideal love and the vision of absolute beauty.</p>
<p>i realize that i have to live, to experience life and to do new things everyday. That is the antidote for boredom, procrastination and sulking. Don't let things be a routine, or else time will just fly by. Twas a good night.</p><br>
<p>And we gotta be a superhero, a renaissance man, against this all. everyones need an outlet for expression, a skill in the arts, music, dance, writing, etc.</p>
and i need to put my feet on the ground, remember i am not special, pay my dues, and still put my mind in the skies.
<br><br><br><br><p><center>The mind is it's own place, and in itself can make a heaven of hell or a hell of heaven. John Milton.</p>
<h2>I WONDER</h2></center>
<p>I'm too emasculated for this shit
<br>jobs, aren't they buying part of your life? and i want family and freedom<br>
<font color="red"> but of course you won't feel anything, not accomplishment nor desire, if you don't put seriousness and passion into</font></p>
<p>Twenty years from now you will be more disappointed by the things that you didn't do than by the ones you did do. So throw off the bowlines. Sail away from the safe harbor. Catch the trade winds in your sails. Explore. Dream. Discover.</p>
<p>the thing is it doesn't matter how much you read. there is a certain extent, you have to do, to experience, and nothing can replace that. what do i do?</p>
</div>
CSS
header
{
margin: 0;
position:fixed;
width: 100%;
top: 0;
background: #BDBDBD;
font-size: 250%;
line-height: 200%;
opacity: 0.5;
height: 72px;
}
header .logo {
width: 35%;
left: 22%;
margin: 0 auto;
position: absolute;
font-family: georgia;
font-variant: small-caps;
}
header .logo:first-letter
{
text-transform: uppercase;
color: red;
font-family: times;
}
body
{
cursor: crosshair;
font-family: helvetica;
font-size: 90%;
opacity: .7;
}
h2
{
font-family: arial, helvetica;
font-weight: bold;
font-size: 550%;
text-shadow: 0 1px 1px grey;
}
.content
{
margin: 80px auto;
text-align: left;
width: 35%;
border: 2px dotted grey;
padding: 0 4% 15% 4%;
}
Upvotes: 0
Reputation: 4580
when you are giving position fixed the header takes the width of the content, so specify the width.
Try this style
header{
position:fixed;
margin:0;
padding:0;
width:100%;
left:0;
text-align:center;
}
Upvotes: 1