for some reason my css just does not want to work at all. The DIV's just don't want to align in the way that i declared them at all. It essentially just wraps around the text, if some text is shown. It doesn't adjust the page at all like a normal css file would.
My css is as show below:
body {
height: 95%;
width:100%;
margin:0 auto;}
#HEADER{
height: 15%;
width: 100%;
border-bottom: 2px solid black;}
#CONTAINER{height:85%;}
#CONTENT{
height:100%;
border-left: 2px solid black;
}
The CSS should control the following divs
<body>
<div id="HEADER">
TITLE HERE
</div>
<div id="CONTAINER">
<div id="MENU">
</div>
<div id="CONTENT">
<asp:ContentPlaceHolder ID="CPH_Content" runat="server">
</asp:ContentPlaceHolder>
</div>
<div id="FOOTER">
</div>
</div>
I've declared my css in the head as shown below:
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title>Labo 2</title>
<link href="/CSS/main.css" rel="stylesheet" type="text/css"/>
<asp:ContentPlaceHolder ID="head" runat="server">
</asp:ContentPlaceHolder>
</head>
I've also tried it with href="~/CSS/main.css" without any luck.
To my knowledge, the external page is not secured in any shape or form, but to make sure i declared the following in web.config to make sure it's accessible
<location path="CSS">
<system.web>
<authorization>
<allow users="*"/>
</authorization>
</system.web>
</location>
Can anyone give me some help or some much needed explanations, any JavaScript i call works like a charm, it's only the css that's really edging me off.
Thanks!
~refers to the root directory of the application - the Virtual Directory defined by IIS which might be very different from the app's directory.body{ ... ; border:10px solid red;}- because it's easy to see, tells me that the element is in the right place, ordering/z-index, and if the style is applying all in 1-2 seconds of looking at it. With your body height, margin, and auto styles, it's a little harder to tell, you know?%values can be very tricky to work with.