I'm encountering an issue with my top navigation buttons. When I resize the window horizontally, the buttons behave in a certain way.
If the browser window becomes too small horizontally, I would like them to act differently.
Is there a way to achieve this?
I want to prevent my buttons from wrapping when resizing the window horizontally.
Summary: I need my navigation buttons to remain unwrapped as long as possible at smaller horizontal sizes, and if they can't fit on the screen without wrapping, to extend offscreen instead of wrapping together.
If you require more information, feel free to ask. I've simplified the problem explanation here.
HTML:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="msapplication-TileColor" content="#FFFFFF">
<meta name="msapplication-TileImage" content="MOPM-ico/favicon-144.png">
<meta name="msapplication-config" content="MOPM-ico/browserconfig.xml">
<link rel="shortcut icon" href="MOPM-ico/favicon.ico">
<link rel="icon" sizes="16x16 32x32 64x64" href="MOPM-ico/favicon.ico">
<link rel="icon" type="image/png" sizes="310x310" href="MOPM-ico/favicon-310.png">
<link rel="icon" type="image/png" sizes="196x196" href="MOPM-ico/favicon-196.png">
<link rel="icon" type="image/png" sizes="160x160" href="MOPM-ico/favicon-160.png">
<link rel="icon" type="image/png" sizes="96x96" href="MOPM-ico/favicon-96.png">
<link rel="icon" type="image/png" sizes="64x64" href="MOPM-ico/favicon-64.png">
<link rel="icon" type="image/png" sizes="32x32" href="MOPM-ico/favicon-32.png">
<link rel="icon" type="image/png" sizes="16x16" href="MOPM-ico/favicon-16.png">
<link rel="apple-touch-icon" sizes="152x152" href="MOPM-ico/favicon-152.png">
<link rel="apple-touch-icon" sizes="144x144" href="MOPM-ico/favicon-144.png">
<link rel="apple-touch-icon" sizes="120x120" href="MOPM-ico/favicon-120.png">
<link rel="apple-touch-icon" sizes="114x114" href="MOPM-ico/favicon-114.png">
<link rel="apple-touch-icon" sizes="76x76" href="MOPM-ico/favicon-76.png">
<link rel="apple-touch-icon" sizes="72x72" href="MOPM-ico/favicon-72.png">
<link rel="apple-touch-icon" href="MOPM-ico/favicon-57.png">
<link type="text/css" rel="stylesheet" href="styles.css" />
<title>
MOPM~
</title>
</head>
<body>
<header>
<!--header-->
<div class="topHead">
<img id="headertxt" src="pictures/header.png" width="100%" height="120px"/>
</div>
<!--header buttons-->
<div class="headButtonSeperator">
<div class="headButton">home</div>
<div class="headButton">about</div>
<div class="headButton">mod info</div>
<div class="headButton">downloads</div>
<div class="headButton">videos</div>
<div class="headButton">links</div>
<div class="headButton">dev team</div>
</div>
</header>
<!--content-->
<div id="home">
</div>
</body>
</html>
CSS:
body
{
margin: 0;
background-image: url('pictures/background.png');
}
/*--Classes--*/
.topHead
{
width: 100%;
height: 120px;
background-color: #272B30;
float: middle;
position: absolute;
margin: auto;
top: 0px;
left: 0px;
right: 0px;
display: block;
border-bottom: 4px dashed #1EC20B;
}
.headButtonSeperator
{
width: 50%;
height: 40px;
background-color: none;
position: absolute;
top: 125px;
left: 509px;
}
.headButton
{
width: 120px;
height: 10px;
background-color: #313A3D;
margin-left: 5px;
display: inline-block;
float: left;
font-size: 0px;
border-left: 3px solid #282E30;
border-bottom: 3px solid #282E30;
border-bottom-left-radius: 20px;
}
.headButton:hover
{
width: 140px;
height: 35px;
background-color: #313A3D;
margin-left: 10px;
position: relative;
display: inline-block;
color: #DB481B;
font-size: 20px;
text-align: center;
line-height: 35px;
font-family: minecraft;
text-shadow: 2px 2px #7A5E55;
border-left: 3px solid #282E30;
border-bottom: 3px solid #282E30;
border-bottom-left-radius: 20px;
}
/*--ID's--*/
#home
{
display: block;
width: 918px;
height: 1000px;
background-color: white;
position: absolute;
top: 500px;
left: 500px;
float: middle;
z-index: -1;
}
/*--Fonts--*/
@font-face
{
font-family: minecraft;
src: url(fonts/minecraft.ttf);
}
@font-face
{
font-family: McBold;
src: url(fonts/ARCADEPI.ttf);
}
@font-face
{
font-family: McBlock;
src: url(fonts/Square.ttf);
}
@font-face
{
font-family: MccBlock;
src: url(fonts/Squareo.ttf);
}