navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

 

CSS cell borders not working?

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> CSS cell borders not working?
Page: [1]
 
dzirkelb1

 

Posts: 1313
Joined: 10/5/2004
From: Cedar Rapids, Iowa
Status: offline

 
CSS cell borders not working? - 4/21/2005 10:58:25   
Here is the code for my CSS page:
body {
background-color: #F7F2D6;
}

input.button {
border:1px solid #000066;
background-color:#CCCC99;
font-family:Arial;
font-size:13pt
}

table {
border: 1px solid #000066;
padding-left: 4px;
padding-right: 4px;
padding-top: 1px;
padding-bottom: 1px;
}

td, th {
border:0px
border-collapse: collapse
}

td.data {
border-right: 1px solid #000066;
border-collapse: collapse;
text-align: center
}

th.data {
border-collapse: collapse;
color: #F7F2D6;
font-weight: bold;
text-align: center;
border-right: 1px solid #f7f2d6; 
background-color: #000066
}


Here is the code for the page that is being displayed:
<HTML>
<HEAD>
<meta http-equiv="Content-Language" content="en-us">
<title>Shop Dates Results</title>
<link rel="stylesheet" type="text/css"
href="shoppersstyle.css" />
</head>

<body>



<p align="center"><b><font size="6">Shop Dates Results</font></b></p>
<P align="center"><b>Route Number:  <%=Request.form("RT1")%></b></p>

<% 
DIM intStoreIDCount

myDSN ="Provider=Microsoft.Jet.OLEDB.4.0;Data Source=c:/apps/msu_database/secure all location data.mdb"
set connStoreIDs=server.createobject("adodb.connection")
set connMaxKFCEvalDates=server.createobject("adodb.connection") 
set connMaxTBEvalDates=server.createobject("adodb.connection") 
connStoreIDs.open myDSN
connMaxKFCEvalDates.open myDSN 
connMaxTBEvalDates.open myDSN 

sqlStoreIDs = "SELECT [KFC ID], [TB ID], SEQ1, RT1 FROM [MASTER ROUTE TABLE 1998] WHERE (RT1="&request.form("RT1")&") ORDER BY SEQ1 ASC"
set rsStoreIDs=connStoreIDs.execute(sqlStoreIDs)
on error resume next
IF rsStoreIDs.eof THEN 
response.write ("ERROR - Problem with using: " & sqlStoreIDs ) 
ELSE 
arrayStoreIDs=rsStoreIDs.getrows
intStoreIDCount = ubound(arrayStoreIDs,2)
END IF

DIM arrayMaxEvalDate(500)
For r = 0 TO intStoreIDCount
sqlMaxKFCEvalDates = "SELECT MAX(EvalDate) AS MaxEvalDate FROM [MASTER ROUTE TABLE 1998] WHERE ([KFC ID]='"&arrayStoreIDs(0,r)&"')" 
sqlMaxTBEvalDates = "SELECT MAX(EvalDate) AS MaxEvalDate FROM [MASTER ROUTE TABLE 1998] WHERE ([TB ID]="&arrayStoreIDs(1,r)&")" 
set rsMaxKFCEvalDates=connMaxKFCEvalDates.execute(sqlMaxKFCEvalDates)
on error resume next 
IF rsMaxKFCEvalDates.eof THEN 
arrayMaxEvalDate(r) = "" 
ELSE
IF rsMaxKFCEvalDates(0)<>"" THEN
arrayMaxEvalDate(r) = rsMaxKFCEvalDates(0)
ELSE
set rsMaxTBEvalDates=connMaxTBEvalDates.execute(sqlMaxTBEvalDates)
arrayMaxEvalDate(r) = rsMaxTBEvalDates(0)
END IF
END IF 
next 

Response.write("<table align=center cellspacing=0 cellpadding=4>" & VbCrLf)
Response.write("<tr>")

Response.write("<th class=data>KFC ID</th>" & VbCrLf)
Response.write("<th class=data>TB ID</th>" & VbCrLf)
Response.write("<th class=data>Sequence<br>Number</th>" & VbCrLf)
Response.write("<th class=data>Last Eval Date</th>" & VbCrLf)
Response.write("<th class=data>Clear to Shop?</th>" & VbCrLf)
Response.write("<th class=data>Date Shop is Clear</th>" & VbCrLf)
Response.write("</tr>")
FOR r = 0 TO ubound(arrayStoreIDs,2) 
Response.write("<tr>" & VbCrLf) 

Dim x, bgcolor
 if x = 1 then
     bgcolor="F7F2D6"
     x=2
Else
    bgcolor="CCCC99"
    x=1
End if


Response.write("<td class=data bgcolor="&bgcolor&">" & arrayStoreIDs(0,r) & "</td>" & VbCrLf)
Response.write("<td class=data bgcolor="&bgcolor&">" & arrayStoreIDs(1,r) & "</td>" & VbCrLf)
Response.write("<td class=data bgcolor="&bgcolor&">" & arrayStoreIDs(2,r) & "</td>" & VbCrLf)
Response.write("<td class=data bgcolor="&bgcolor&">")
IF arrayMaxEvalDate(r)<>"" then
Response.write(arrayMaxEvalDate(r)&"</td>" & VbCrLf)
ELSE
response.write("Never Shopped</td>" & VbCrLf)
end if
Response.write("<td class=data bgcolor="&bgcolor&">")
IF arrayMaxEvalDate(r)<>"" then
IF now()-arrayMaxEvalDate(r)>=7 then
response.write("Yes")
else
response.write("<b><font color='red'>No</font></b>")
end if
else
Response.write("Yes")
end if
Response.write("</td>" & VbCrLf)
IF now()-arrayMaxEvalDate(r)>=7 then
response.write("<td bgcolor="&bgcolor&"></td>")
else
Response.write("<td bgcolor="&bgcolor&">" & arrayMaxEvalDate(r)+7 & "</td>" & VbCrLf)
end if
Response.write("</tr>" & VbCrLf) 
NEXT 
Response.write("</table>" & VbCrLf) 
response.write("<br><br>")

rsStoreIDs.close
rsMaxKFCEvalDates.close
rsMaxTBEvalDates.close
connStoreIDs.close
connMaxKFCEvalDates.close 
connMaxTBEvalDates.close

set rsStoreIDs=nothing
set rsMaxKFCEvalDates=nothing
set rsMaxTBEvalDates=nothing
set connStoreIDs=nothing 
set connMaxKFCEvalDates=nothing 
set connMaxTBEvalDates=nothing
%>

</body>
</html>


If you go to www.msushoppers.com/shopdates.asp and enter in 10850, then it posts to this page. You will notice that the cells that do not have any data do not print the border, or, at least, do not print with the same color as the rest of the table / cells. What have I done wrong and is there a way to correct this? Thanks!
jaybee

 

Posts: 14191
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: CSS cell borders not working? - 4/21/2005 13:18:08   
No, it's not the borders. If you display a table with empty cells the surrounding cells shift, or rather the empty ones collapse.

Put something in them if they're empty.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to dzirkelb1)
dzirkelb1

 

Posts: 1313
Joined: 10/5/2004
From: Cedar Rapids, Iowa
Status: offline

 
RE: CSS cell borders not working? - 4/21/2005 13:29:16   
cool, I'll give it a try (some sort of if then statment will suffice :)

(in reply to jaybee)
dzirkelb1

 

Posts: 1313
Joined: 10/5/2004
From: Cedar Rapids, Iowa
Status: offline

 
RE: CSS cell borders not working? - 4/21/2005 16:40:35   
thank! that helped putting a little if then statement in there and making the same color as the background to hide it, thanks!

(in reply to dzirkelb1)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> CSS cell borders not working?
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts