It appears you have not yet registered with DEVPPL. To register please click here... (it's fast, easy and free!)

Forum

Log In Sponsors
Board index Programming CSS Forum

Whats wrong with this code?

Whats wrong with this code?

Postby Wag on Sun Mar 16, 2008 2:11 am

It works when I veiw it in Dreamweaver/Design but it does not work in either IE or Firefox.


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<HTML>
<head>

<TITLE>Test File</TITLE>


<style type="text/css">
<!--
body {
scrollbar-face-color:#000000;
scrollbar-highlight-color:#DDFFFF;
scrollbar-3dlight-color:#FFFFFF;
scrollbar-darkshadow-color:#000000;
scrollbar-shadow-color:#6699FF;
scrollbar-arrow-color:#669999;
scrollbar-track-color:#F63E00;
}

P {font-family:"ARIAL" font-color:"#F63E00"}
.other {font-family:"COURIER"}

table {
background-color:#FFF;
width:100%;
border-collapse:collapse;
border:2px solid red;
}

/* the border will be defined by the td tags */
th.BorderMeRed {
background-color:#000;
border:2px dashed red;
padding:10px;

}

/* let's do a blue... */
td.BlueWho {
background-color:#FFF;
border:2px solid blue;
padding:15px;
}



-->
</style>
</head>


<body>

<table width="95%">
<tr>
<th class="BorderMeRed"><p>BBBBBBB</p></th>
<th class="BorderMeRed">BBBBBBBBB</th>
</tr>
<tr>
<td class="BlueWho"><p>BBBBBBBB</p></td>
<td class="BlueWho">BBBBBBBBB</td>
</tr>
</table>



</body>

</HTML>
Wag
 
Posts: 6
Joined: Sun Feb 17, 2008 8:38 pm

Postby dflynn on Sun Mar 16, 2008 5:16 am

get rid of either the BorderMeRed/BlueWho in your css or get rid of the th/td in your css. to define the style for a td tag you jsut use:


td{
border:1;
}


hope this helps
User avatar
dflynn
500+ Club
 
Posts: 860
Joined: Wed Oct 03, 2007 9:06 pm
Location: Guelph, Canada

re

Postby Wag on Sun Mar 16, 2008 1:53 pm

Thanks

I got that example off a howto page, guess they aren't always right :D
Wag
 
Posts: 6
Joined: Sun Feb 17, 2008 8:38 pm

Postby rangana on Tue Apr 01, 2008 5:21 am

@Wag,
Dflynn definitely solved this issue...

You had implemented the scrollbar changes, which does'nt work on compliant browsers, like FF :)

You are using tables, these are not intended for layouts ;)
User avatar
rangana
500+ Club
 
Posts: 935
Joined: Wed Feb 27, 2008 5:14 am
Location: Cebu City Philippines


Who is online

Users browsing this forum: No registered users and 1 guest