Go Back   CodingForums.com > :: Server side development > ASP

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 03-28-2013, 09:00 PM   PM User | #1
SteveH
Regular Coder

 
Join Date: Nov 2005
Posts: 615
Thanks: 91
Thanked 1 Time in 1 Post
SteveH is an unknown quantity at this point
Date, spacing, margin

Hello

I don't wish to be pedantic, but what is the reason, please, for this space (screenshot attached) between the ordinal date and the name of the month?

This is my code:

Code:
<%
Dim suffix
Select Case Day(Date())
    Case 1,21,31: suffix = "st"
    Case 2,22: suffix = "nd"
    Case 3,23: suffix = "rd"
    Case Else: suffix = "th"
End Select

Response.Write "<p class=""show_date"">" & WeekdayName(Weekday(Date())) _
             & " " & Day(Date()) & "<sup>" & suffix & "</sup>" _
             & MonthName(Month(Date())) & "</p>"


%>
and this is the CSS:
Code:
p.show_date { 
    font-size: 10px;  
text-align: right; 
margin-right:10px;

}
p.show_date sup {
    font-size: 10px;
margin-right:10px;
}
I only noticed it after I had added the right-margin to pull the date away from the side a bit.

Many thanks!
Attached Thumbnails
Click image for larger version

Name:	space.jpg
Views:	25
Size:	14.9 KB
ID:	12010  
SteveH is offline   Reply With Quote
Old 03-28-2013, 09:50 PM   PM User | #2
Old Pedant
Supreme Master coder!

 
Old Pedant's Avatar
 
Join Date: Feb 2009
Posts: 23,200
Thanks: 59
Thanked 3,996 Times in 3,965 Posts
Old Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to allOld Pedant is a name known to all
You put it there:
Code:
p.show_date sup {
    font-size: 10px;
    margin-right:10px;
}
Without that 10px margin on the right side of the <sup>...</sup> you wouldn't have any space. Just remove that or change it to the number of pixels you want.

Nothing to do with ASP. Just CSS.
__________________
An optimist sees the glass as half full.
A pessimist sees the glass as half empty.
A realist drinks it no matter how much there is.
Old Pedant is offline   Reply With Quote
Users who have thanked Old Pedant for this post:
SteveH (03-28-2013)
Old 03-28-2013, 10:00 PM   PM User | #3
SteveH
Regular Coder

 
Join Date: Nov 2005
Posts: 615
Thanks: 91
Thanked 1 Time in 1 Post
SteveH is an unknown quantity at this point
Thanks for that Old Pedant. It looks a bit better now at 5px.

Cheers!

Steve
SteveH is offline   Reply With Quote
Reply

Bookmarks

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 07:12 AM.


Advertisement
Log in to turn off these ads.