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 trial
Dan Sinclair
1,420 PointsHow to get arrow next page links to resize to different browser sizes?
So I'm trying to get my css arrow triangle shapes that are next and previous page links, to actually resize and stay consistent on the web browser.
However, when I start to resize the width of the browser, they are the only elements that do not resize when the browsers width changes. The images are totally fine, but the left and right arrows do not stay in the browser frame once resizing of width begins.
I have tried max and min width %, cant seem to get it to work.
#left-arrow-article {
position: relative;
z-index: 10;
left: -700px;
}
#right-arrow-article {
position: relative;
z-index: 10;
right: -50px;
}
.left-arrow {
margin: 200px 0 0 0;
position: fixed;
width: 0;
height: 0;
border-top: 15px solid transparent;
border-right: 15px solid #32cd32;
border-bottom: 15px solid transparent;
}
.right-arrow {
margin: 200px 0 0 600px;
position:fixed;
width: 0;
height: 0;
border-top: 15px solid transparent;
border-left: 15px solid #32cd32;
border-bottom: 15px solid transparent;
}
<!DOCTYPE html>
<html>
<head>
<link href='http://fonts.googleapis.com/css?family=Ubuntu:300,400,500,700,300italic,400italic,500italic,700italic' rel='stylesheet' type='text/css'>
<meta charset="utf-8">
<title>PLAZM: Box of Rocks Magazine Layout</title>
<link rel="stylesheet" type="text/css" href="dan-sinclair-flex-CSS.css">
<link rel="stylesheet" type="text/css" href="Secondary-Page-Content-Extras.css">
</head>
<body>
<header class="text-details">
<nav>
<ul>
<li><a href="http://dan-sinclair.com"> Projects</a></li>
<li><a href="http://dan-sinclair.com/about"> About</a></li>
<li><a href="http://dan-sinclair.com/cv-resume"> CV-Resume</a></li>
</ul>
</nav>
</header>
<article>
<h1>
<span class="work-titles">
PLAZM Box of Rocks
</span>
</h1>
</article>
<section class="flex-work-images">
<article id="left-arrow-article">
<a href="Sawtooth-Initiative.html" class="left-arrow"></a>
</article>
<article id="right-arrow-article">
<a href="Bling-Ring-Shoes.html" class="right-arrow"></a>
</article>
<p>
<img class="work-images-main" src="Box_Rocks_Front.png">
</p>
<p>
<img class="work-images-main" src="Box_Rocks_Layout01.png">
</p>
<p>
<img class="work-images-main" src="Box_Rocks_Layout02.png">
</p>
</section>
<body/>
1 Answer
Dan Jones
778 PointsHey.
This is likely because you've set the position property to fixed, meaning it wont move from it's position. Effectively it's completely static.
Try using position: relative instead. But you may need to amend your markup.
Thanks!