Jake_A_T
11-09-2012, 03:58 AM
Hi there,
I designed my website using HTML/CSS, and I have a top banner right below my fixed header, and below the banner is my menu/navigation. When i view the site on my laptop and 24" mac, both are centred; however, when I view my site on a 27" Mac, the banner is off to the left and the menu/navigation bar is a bit over to the right. Is there any way I can have both stay in the same spot no matter what size monitor I view the site on? I'll post the CSS/HTML for both below ("title" is the banner).
#title
{
height: 100px;
position: relative;
text-align:left;
z-index: -1;
margin-left: auto;
}
#menu
{
padding-top: 18px;
border-bottom: double 2px white;
border-top: double 2px white;
width: 75%;
height: 50px;
margin-top: 160px;
margin-left: 868px;
margin-right: 203px;
float: right;
text-align:center;
letter-spacing:4px;
word-spacing:4px;
font-family: "Arial";
font-size: 150%;
color: #ffffff;
}
<img src="images/banner.png" alt="Books and Technology" style="margin-left: 380px"/>
<div id="menu">
<font size="5"><b><a href="html.html">HOME</a> | <a href="page1.html">PAGE 1</a> | <a href="page2.html">PAGE 2</a> | <a href="page3.html">PAGE 3</a> | <a href="page4.html">PAGE 4</a> | <a href="page5.html">PAGE 5</a> | <a href="page6.html">PAGE 6</a></b></font>
</div>
I designed my website using HTML/CSS, and I have a top banner right below my fixed header, and below the banner is my menu/navigation. When i view the site on my laptop and 24" mac, both are centred; however, when I view my site on a 27" Mac, the banner is off to the left and the menu/navigation bar is a bit over to the right. Is there any way I can have both stay in the same spot no matter what size monitor I view the site on? I'll post the CSS/HTML for both below ("title" is the banner).
#title
{
height: 100px;
position: relative;
text-align:left;
z-index: -1;
margin-left: auto;
}
#menu
{
padding-top: 18px;
border-bottom: double 2px white;
border-top: double 2px white;
width: 75%;
height: 50px;
margin-top: 160px;
margin-left: 868px;
margin-right: 203px;
float: right;
text-align:center;
letter-spacing:4px;
word-spacing:4px;
font-family: "Arial";
font-size: 150%;
color: #ffffff;
}
<img src="images/banner.png" alt="Books and Technology" style="margin-left: 380px"/>
<div id="menu">
<font size="5"><b><a href="html.html">HOME</a> | <a href="page1.html">PAGE 1</a> | <a href="page2.html">PAGE 2</a> | <a href="page3.html">PAGE 3</a> | <a href="page4.html">PAGE 4</a> | <a href="page5.html">PAGE 5</a> | <a href="page6.html">PAGE 6</a></b></font>
</div>