I have a box with the word "Test" inside it. I need to adjust its width to be 100% of its containing div, but I'm unsure about how to do this without using Javascript. The example in the jsFiddle linked below demonstrates what I am trying to achieve.
Link to JsFiddle example: http://jsfiddle.net/a6ZCR/3/
Below is a snippet of the code:
<!DOCTYPE html>
<html>
<head>
<title>Sample Page</title>
<link rel="stylesheet" href="Assets/CSS/Global/Global.css" />
</head>
<body>
<div id="Wrapper">
<div id="Header">
<div id="HeaderInner">
<a href="#" class="HeaderLink Main">Link</a>
<a href="#" class="HeaderLink Main">Link</a>
<a href="#" class="HeaderLink Main">Link</a>
<a href="#" class="HeaderLink Main">Link</a>
<a href="#" class="HeaderLink Side">Log In</a>
<a href="#" class="HeaderLink Side">Register</a>
</div>
</div>
<div id="Menu">
</div>
<div id="Body">
<div id="BodyPadding">
<div class="BasicBox">
Test
</div>
</div>
</div>
</div>
</body>
</html>
The corresponding CSS:
/* CSS Styles */
html, body, #Wrapper {
margin: 0;
padding: 0;
width: 100%;
height: 100%;
background-color: #F4F4F4;
font-family: Arial, Helvetica, sans-serif;
font-size: 15px;
}
#Header {
position: fixed;
top: 0;
left: 0;
display: block;
width: 100%;
min-width: 965px;
height: 50px;
background-color: #333;
z-index: 1000;
}
// Remaining CSS styles omitted for brevity...