As a beginner ASP.NET developer, I am encountering CSS for the first time. The CSS file I have is fairly simple, but I am facing difficulties with the footer section. The current appearance of the footer is as follows:
I am looking to make the following modifications:
- Add a small space between the text and the borders
- Center the text within the footer, which has been challenging despite using float
- Ensure that the width of the footer remains fixed to prevent it from extending beyond the body border
Below is my existing CSS code:
.footer
{
font-family: Verdana, Arial, Helvetica, sans-serif;
font-size: 11px;
vertical-align: bottom;
text-align: center;
float: left;
width: 1250px;
border-bottom: 2px solid grey;
border-right: 2px solid grey;
border-left: 2px solid grey;
}
.footer p.left {
text-align:left;
float:left;
}
.footer p.right {
float:right;
text-align:right;
}
.footer p.centered {
text-align:center;
}
Additionally, here is the ASP.NET code related to the footer:
<div class="footer">
<p class="left">
Copyright For MyCompany <%= DateTime.Now.Year.ToString() %>. All Rights Reserved
</p>
<p class="right">
Developed by <strong>IBM/STAD/PSD</strong>
</p>
<p class="centered">
Last update: 10/23/2013 02:42 PM
<br />
For any issue/comments Contact <a href="mailto:Test">
The Administrator (Test)</a>
</p>
</div>
Your assistance in addressing these concerns would be greatly appreciated.
Thank you in advance.