Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialJustin Zhang
1,482 Pointstext-align: center; not working fully
the text in .top is still slightly to the left of the center.
.top { border-top: 2px solid lightgrey; padding: 10px; text-align: center; font-family: "cinzelregular"; }
Justin Zhang
1,482 PointsNo. how do i paste the entire code?
Justin Zhang
1,482 Pointsheres the css.
@import "/css/reset.css";
@font-face {
font-family: 'cinzel_blackregular';
src: url('/fonts/cinzel-black-webfont.woff2') format('woff2'),
url('/fonts/cinzel-black-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'cinzelbold';
src: url('/fonts/cinzel-bold-webfont.woff2') format('woff2'),
url('/fonts/cinzel-bold-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
@font-face {
font-family: 'cinzelregular';
src: url('/fonts/cinzel-regular-webfont.woff2') format('woff2'),
url('/fonts/cinzel-regular-webfont.woff') format('woff');
font-weight: normal;
font-style: normal;
}
.main-header {
border-bottom: 3px solid black;
padding-bottom: ;
height: 1050px;
background: linear-gradient(lightblue, transparent 90%),
url("/img/seattle-71777.jpg") no-repeat center;
background-size: 1920px 1050px;
}
.title {
font: 6rem 'cinzelbold';
text-align: center;
border-bottom: 4px ridge black;
}
.nickname {
font: 4rem 'cinzelregular';
text-align: center;
color: rgb(80, 200, 120);
}
main {
padding: 20px;
margin: 20px;
}
.hotels {
padding: 20px;
margin: 20px;
}
.food {
padding: 20px;
margin: 20px;
}
.attractions {
padding: 20px;
margin: 20px;
}
h2 {
font: 3rem 'Trebuchet MS';
}
ul,
ol {
margin: 30px 0;
}
li {
margin: 20px 0;
font: 2rem 'cinzelregular';
}
p {
font-size: 1.5rem;
}
a:link {
text-decoration: none;
}
.top {
border-top: 2px solid lightgrey;
padding: 10px;
text-align: center;
font-family: "cinzelregular";
}
.topic {
text-decoration: underline;
}
img {
float: right;
padding: 0px 20px;
}
.fourseasons {
height: 430.5px;
width: 765px;
}
.seafood {
height: 430.5px;
width: 765px;
}
/* Image Positon */
.fourseasons {
position: relative;
top: -350px;
}
.seafood {
position: relative;
top: -300px;
}
and heres the css file used in the @import
html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed,
figure, figcaption, footer, header, hgroup,
menu, nav, output, ruby, section, summary,
time, mark, audio, video {
margin: 0;
padding: 0;
border: 0;
font-size: 100%;
font: inherit;
vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure,
footer, header, hgroup, menu, nav, section {
display: block;
}
body {
line-height: 1;
}
ol, ul {
list-style: none;
}
blockquote, q {
quotes: none;
}
blockquote:before, blockquote:after,
q:before, q:after {
content: '';
content: none;
}
table {
border-collapse: collapse;
border-spacing: 0;
}
KRIS NIKOLAISEN
54,971 PointsCan you post the html?
1 Answer
Alexander D
8,685 PointsTo fix this, I removed the inner div inside the footer and applied the class ".top" to the footer itself:
<footer class="top">
<p><a href="#">Back to top</a></p>
</footer>
At this point your can simply declare your CSS this way, as you don't really need the class "top" anymore
footer {
border-top: 2px solid lightgrey;
padding: 10px;
text-align: center;
}
footer a {
font-family: "cinzelregular";
/*
whatever color or other style you need */
}
Milan Toth
12,182 PointsMilan Toth
12,182 Pointsdoes the text have a style on in that makes it go to the left?