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

a bug in css??

a bug in css??

Postby peer2peer on Sun Dec 26, 2004 9:04 pm

is this a bug in css?
please copy and run this code:

<html>
<style>
.currentHeaderTabNew { font: 12px arial,helvetica, sans-serif;
font-weight: bold;
letter-spacing: 1;
color: #FFFFFF;
border-width: 1px;
border-style: solid;
border-color: #888888 #888888 #3366CC #888888;
padding: 0.2em;
background-color: #3366CC; }
.headerTabNew { font: 12px arial,helvetica, sans-serif;
font-weight: normal;
color: #000000;
border-width: 1px;
border-style: solid;
border-color: #888888 #888888 #A8A8A8 #888888;
padding: 0.2em;
background-color: #EEEEEE;
text-align: center; }
.headerTabSpacer { width: 2px; background-color: #FFFFFF;
border-width: 0px 0px 1px 0px; border-style: solid; border-color:
#888888;}
</style>

<body>
<table cellspacing="0" cellpadding="0" border="0" align="center">
<tr bgcolor="#DDDDDD">
<td class="headerTabNew tabMainNew" width="51" nowrap><a href=""
class="tabtxt">1</a></td>
<td class="headerTabSpacer">&nbsp;</td>
<td class="headerTabNew tabMainNew" width="51" nowrap><a href=""
class="tabtxt">2</a></td>
<td class="headerTabSpacer">&nbsp;</td>
<td class="headerTabNew tabMainNew" width="51" nowrap><a href=""
class="tabtxt">3</a></td>
<td class="headerTabSpacer">&nbsp;</td>
<td class="headerTabNew tabMainNew" width="51" nowrap ><a
href="" class="tabtxt">4</a></td>
<td class="headerTabSpacer">&nbsp;</td>
<td class="headerTabNew tabMainNew" width="51" nowrap><a
href="" class="tabtxt">5</a></td>
<td class="headerTabSpacer">&nbsp;</td>
<td class="headerTabNew tabMainNew" width="51" nowrap><a href=""
class="tabtxt">6</a></td>
<td class="headerTabSpacer">&nbsp;</td>
<td class="headerTabNew tabMainNew" width="51" nowrap><a href=""
class="tabtxt">7</a></td>

</tr>

</table>

</body>
</html>

can someone tell me why the borders in the 1,6 td's are not shown?

it works only in explorer but in netscape or mozilla - no border in the right side.

please help
peer2peer
 
Posts: 3
Joined: Sun Dec 26, 2004 8:56 pm

Postby webmaster on Mon Dec 27, 2004 12:21 am

Firefox and tables is not a good combination, but you can fix it if you remove all the width="51" settings in the <td>:s and set width="357" in the <table>

Then it will work in both IE and Mozilla, and your code will even load faster :D

Here is the code if you just want to copy:
Code: Select all
<table width="357" cellspacing="0" cellpadding="0" border="0" align="center">
   <tr>
      <td class="headerTabNew tabMainNew" nowrap><a href="" class="tabtxt">1</a></td>
      <td class="headerTabSpacer">&nbsp;</td>
      <td class="headerTabNew tabMainNew" nowrap><a href="" class="tabtxt">2</a></td>
      <td class="headerTabSpacer">&nbsp;</td>
      <td class="headerTabNew tabMainNew" nowrap><a href="" class="tabtxt">3</a></td>
      <td class="headerTabSpacer">&nbsp;</td>
      <td class="headerTabNew tabMainNew" nowrap ><a href="" class="tabtxt">4</a></td>
      <td class="headerTabSpacer">&nbsp;</td>
      <td class="headerTabNew tabMainNew" nowrap><a href="" class="tabtxt">5</a></td>
      <td class="headerTabSpacer">&nbsp;</td>
      <td class="headerTabNew tabMainNew" nowrap><a href="" class="tabtxt">6</a></td>
      <td class="headerTabSpacer">&nbsp;</td>
      <td class="headerTabNew tabMainNew" nowrap><a href="" class="tabtxt">7</a></td>
   </tr>

</table>


And welcome to DEVPPL :D
Make sure to check out our TNX Review and Link Vault Review
User avatar
webmaster
Site Admin
 
Posts: 2695
Joined: Tue Aug 17, 2004 1:07 pm
Location: Sweden

thanks a lot

Postby peer2peer on Mon Dec 27, 2004 6:24 am

but the problem is i need to control the width of each TD
how can i do that??

thanks
peer2peer
 
Posts: 3
Joined: Sun Dec 26, 2004 8:56 pm

Postby ReFredzRate on Mon Dec 27, 2004 9:04 am

You can try controlling the <TD>'s using percents. Instead of like <TD WIDTH="51"> you could use <TD WIDTH="30%">
ReFredzRate
1000+ Club
 

Re: thanks a lot

Postby webmaster on Mon Dec 27, 2004 11:10 am

peer2peer wrote:but the problem is i need to control the width of each TD
how can i do that??

thanks



Then use your original script, but set width="1%" in the <table> like this:
Code: Select all
<table width="1%" cellspacing="0" cellpadding="0" border="0" align="center">
   <tr>
      <td class="headerTabNew tabMainNew" width="51" nowrap><a href="" class="tabtxt">1</a></td>
      <td class="headerTabSpacer">&nbsp;</td>
      <td class="headerTabNew tabMainNew" width="51" nowrap><a href="" class="tabtxt">2</a></td>
      <td class="headerTabSpacer">&nbsp;</td>
      <td class="headerTabNew tabMainNew" width="51" nowrap><a href="" class="tabtxt">3</a></td>
      <td class="headerTabSpacer">&nbsp;</td>
      <td class="headerTabNew tabMainNew" width="51" nowrap ><a href="" class="tabtxt">4</a></td>
      <td class="headerTabSpacer">&nbsp;</td>
      <td class="headerTabNew tabMainNew" width="51" nowrap><a href="" class="tabtxt">5</a></td>
      <td class="headerTabSpacer">&nbsp;</td>
      <td class="headerTabNew tabMainNew" width="51" nowrap><a href="" class="tabtxt">6</a></td>
      <td class="headerTabSpacer">&nbsp;</td>
      <td class="headerTabNew tabMainNew" width="51" nowrap><a href="" class="tabtxt">7</a></td>
   </tr>
</table>
User avatar
webmaster
Site Admin
 
Posts: 2695
Joined: Tue Aug 17, 2004 1:07 pm
Location: Sweden

but whats the logic behind it??

Postby peer2peer on Mon Dec 27, 2004 6:34 pm

???
peer2peer
 
Posts: 3
Joined: Sun Dec 26, 2004 8:56 pm

Postby webmaster on Mon Dec 27, 2004 7:18 pm

That I don't know =)
But is it working for you now?
Make sure to check out our TNX Review and Link Vault Review
User avatar
webmaster
Site Admin
 
Posts: 2695
Joined: Tue Aug 17, 2004 1:07 pm
Location: Sweden

Postby Phate on Mon Dec 27, 2004 8:40 pm

I think that it has to do with the pixels, and firefox resizing the size of the workspace to like 98%

When it resizes, it loses some pixels
Web-Developing since '03
Image
User avatar
Phate
500+ Club
 
Posts: 826
Joined: Sun Nov 21, 2004 4:12 am
Location: 127.0.0.1

Postby webmaster on Mon Dec 27, 2004 8:53 pm

Phate wrote:I think that it has to do with the pixels, and firefox resizing the size of the workspace to like 98%

When it resizes, it loses some pixels
are you sure about that, Ive never heard about it, or seen any lost pixels on any other sites
Make sure to check out our TNX Review and Link Vault Review
User avatar
webmaster
Site Admin
 
Posts: 2695
Joined: Tue Aug 17, 2004 1:07 pm
Location: Sweden

Postby Phate on Tue Dec 28, 2004 2:30 am

actually... it just sounded good in my head... When i re-read it... it just sounded stupid. I thought that it might be the same as photoshop, for example, where if you resize the platform to like 50%, you lose some pixels. I apologize for my previous statement; I am retarted.
Web-Developing since '03
Image
User avatar
Phate
500+ Club
 
Posts: 826
Joined: Sun Nov 21, 2004 4:12 am
Location: 127.0.0.1

Next

Who is online

Users browsing this forum: No registered users and 0 guests