Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 460543
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T22:53:03+00:00 2026-05-12T22:53:03+00:00

Simply set the border to red and borderwidth=1px. Using the F12 viewer I can

  • 0

Simply set the border to red and borderwidth=1px. Using the F12 viewer I can see the CSS has been applied and it should be rendering all four borders, but only the bottom and right borders are visible. changing the border to 2px makes it visible.

How can I fix it so today’s date has a border around it?

Code is inline since the calendar control is fail and doesn’t apply CSS half the time properly:

<asp:Calendar runat="server" ID="calendarBooking" BorderStyle="None" 
        BackColor="White" OnLoad="Calendar_Load"
        ondayrender="calendarBooking_DayRender">
    <DayHeaderStyle BackColor="#98c4eb" ForeColor="#ffffff"
    Width="30px" Height="30px"
    BorderStyle="None"
    />

    <DayStyle BackColor="#ffffff"
    ForeColor="Black"
    BorderStyle="Solid"
    BorderWidth="1px"
    BorderColor="#cccccc"
    Width="30px"
    Height="30px"


    />

    <TitleStyle BorderStyle="None" BackColor="#ffffff" />

    <NextPrevStyle BorderStyle="None" />

    <TodayDayStyle BorderColor="Red"/>

    <SelectedDayStyle BackColor="#FF6A00"/>

    </asp:Calendar>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T22:53:03+00:00Added an answer on May 12, 2026 at 10:53 pm

    The problem is coming from the table output by .NET – it contains this style definition:

    border-collapse:collapse;
    

    By disabling this rule (using Firefox with Firebug) the border displays correctly for “Today” – of course, this means that every cell has a border, so you have two 1px borders next to each other, which makes all of the cells appear to have a 2px border, which probably isn’t what you want.

    Another possible solution is to adjust the anchor instead – like this:

    <TodayDayStyle CssClass="today"/>
    

    With this css rule:

    td.today a
           {
            border: 1px solid Red;
            display: block;
            width: auto;
            height: 24px;
            padding: 4px 0 0 0;
           }
    

    Again, this isn’t perfect as the red-border appears INSIDE the existing gray border.

    Another solution would be to use a highlighted background instead…

    <TodayDayStyle BackColor="Red" ForeColor="White"/>
    

    The problem you have when trying to solve this is that you can’t control the HTML being generated for the calendar – it’s being invented magically by the calendar control – so all the proper fixed you’d normally do in HTML and CSS aren’t necessarily available. I hope one of these suggestions helps though.

    UPDATE: If you want to put the red border right next to the gray border with no gap, you can change your css rules as follows:

    td.today 
    {
         padding: 0;
    }
    
    td.today a
    {
        border: 1px solid Red;
        display: block;
        width: auto;
        height: 24px;
        padding: 3px 0 0px 0;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Sadly, CSS outline isn't supported in IE7, so i'm stuck using border. But adding
I've been trying to build a web site and I was using a CSS
I'm using an accordion container that has it's creation policy set to auto. One
This has got to be something simple: I set up a frames page with
Simple question, but I haven't found a good explanation on google. When using Set
Im working on a HTML test page with a simple grid that has red
I'm attempting to provide a border for a select tag and have been pulling
suppose the UIWebView is full screen, the html&css is simply like this: <body><div id=wrapper
I have a small (500kb) swing applet that displays very simple/limited set of small
A simple stupid UPDATE table SET something=another WHERE (always true) in accident will easily

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.