Jump to content

Table border


crmamx

Recommended Posts

table.html

<html>
<head>
</head>
<body>
<table style="text-align: left; width: 50%;" border="10"
cellpadding="3" cellspacing="2">
  <tbody>
    <tr>
      <td align="left" valign="top">PRESIDENT</td>
      <td align="left" valign="top">JACK PHILLIPS</td>
      <td align="left" valign="top"><a
href="mailto:umpire33@bellsouth.net">EMAIL</a></td>
    </tr>
    <tr>
      <td align="left" valign="top">VICE-PRESIDENT</td>
      <td align="left" valign="top">JOE WARD</td>
      <td align="left" valign="top"><a
href="mailto:jlward1944@hotmail.com">EMAIL</a></td>
    </tr>
  </tbody>
</table>
</body>
</html>

 

This program produces a light grey, apprx 1/4 inch border.

 

The exact same code in one of my site programs produces a pencil thin black border. I cannot find any css that would be affecting it.

 

Any ideas?

Link to post
Share on other sites
He's telling you that you have your border width set to 10.  Which is why it's thick as shit.

 

I understand why it is "thick as shit."

 

What I am asking is why is it thick in the stand alone html program but when I copy the code and put in in one of my site .php programs it is not "thick as shit." It is pencil thin.

 

It just so happens I want it thick, but not a 10. Set that for testing. But I can't get it to expand no matter what value I use.

Link to post
Share on other sites

If you're using CSS to style the other tables, it's probably overriding the border="10" attribute in the <table> tag. I don't see any stylesheet imported into this script, so whatever you set in the tag's attributes is what the table will get.

Link to post
Share on other sites

When I do a view/page source, this is what I see:

 

<table
<!-- style="table-layout:fixed; width: 300px; text-align: left;"
border="4" cellpadding="2" cellspacing="2"> -->
<table style="text-align: left; width: 50%;" border="10"
cellpadding="3" cellspacing="2">

 

Is this not the interpreted code sent to the browser? I thought so which means I still have no idea why the border does not show up.

Link to post
Share on other sites

If you are changing the value of border="10" and it's not changing the output, then there is an exterior force at hand.  Ensure you don't have a table{} definition in an external stylesheet.  If you aren't using an external sheet, check that you're uploading the correct file in your ftp manager.  I've done that more than once.

Link to post
Share on other sites

Also look it in IE8 and click the compatibility mode button, it's near your refreash button and see what happens.

 

I think borders work better when you go <table class="main"></table>. I think.

 

then go something like

 

.main {

  border: 1px #000000 solid;

}

Link to post
Share on other sites

Your CSS is:

 

table,th,td
{
border: 1px solid black;
/* other rules */
}

 

It's obviously overriding what you want.  If you're going to play with border thickness, do it in CSS, not HTML.

Link to post
Share on other sites

Nightslyr:

 

Brilliance is like ice, it surfaces to the top.. :D

 

How did you find that? I looked thru my external css file and it is not there. Plus I do not know how to write that particular statement so I knew I didn't do it. But that is the problem.

 

However, I thought this was the priority for css with 4  being the highest priority.

 

  1. Browser default

  2. External style sheet

  3. Internal style sheet (in the head section)

  4. Inline style (inside an HTML element)

 

Therefore it seems the border should be a 10. And like previously mentioned, the view/page source says it is a 10. But obviously not... :confused:

 

Anyway, I have had a lot of problems with the custom.css file. That is the reason you will see a of of internal styling in various programs just to get the program to work the way I want it. Eventually I want to consolodiate it all in one external css file.

 

Thanks, I should be able to fix it now like I want it and screw something else up..haha

 

 

Link to post
Share on other sites

The CSS I found is in the internal stylesheet for your page (you'll have to scroll a bit to see it).  Also, border=10 isn't a style, it's an HTML attribute.  An inline style would look like:

 

<table style="border: 10px solid #000;"></table>

Link to post
Share on other sites

crmamx, did you watch the video i made about firebug? I shows exactly where styles come from, and how you can detect style overwrite. Just so you know i made that for you, since you are struggling with css on a daily basis.

Link to post
Share on other sites

Of course I watched it. I would never ask you to do something and then not utilize it.

 

Can't honestly say that I feel competent with it but I am going back to it right now and try to get to where I can use it for my problems.

 

Yes, I am still struggling with css. What I am trying to do now is convert the problems I had in different areas. I got most of it to work with Internal css or Inline css. As soon as I get the rest of my problems solved, I am going back and try and move and consolidate them in custom.css.

 

But I will say I have a much better understanding of it as a result of your explanation of the box model and also the wrapper.

Link to post
Share on other sites

But did you manage to start up firebug? I mean although its only 4min 33 seconds it repeats exactly what should and can be done. quite often i post a question and you than either mark it solved so you don't need to answer it ( that's my feeling) or you ask another question. I ask those question or riddles/puzzles to see at what level you are, so i know where to explain better, but without feedback I just assume it worked.

 

Link to post
Share on other sites

The posts no longer have a solved button which I thought they would have fixed by now. I would imagine it would get frustrating to those that are trying to help us lowly ones.

Link to post
Share on other sites

@ above: Especially when you pop up with crap like this:

 

Nightslyr:

 

Brilliance is like ice, it surfaces to the top.. :D

 

How did you find that? I looked thru my external css file and it is not there. Plus I do not know how to write that particular statement so I knew I didn't do it. But that is the problem.

 

When Pikachu and I told you the same thing repeatedly.  It took Nightslyr to do the work for you, kudos for him for doing that. 

 

I just hope you place © PHPFreaks on your site, or the equivalent.  :wtf:

Link to post
Share on other sites

Sometimes things need to be phrased just a little differently before they make sense to someone. That's just the way it is. I know in the past I've needed the same thing explained to me several different ways before any of them made sense. There's no reason to let it bother you . . .

Link to post
Share on other sites

pik:

 

Your rating on my respect meter just continues to rise.

 

After my last encounter, I decided that I would not respond to any more "digs." I'll just consider the source.

 

I was going to consider this topic closed but not solved, however I will go ahead with where it stands.

 

I posted the reply to Nightslyr before I tested it because I just knew that would fix it. But it didn't. I went in and commented out the code he noted and I still have the same result.

 

In addition, it is my understanding that inline css takes priority over internal or external. And that's is what I have, an inline border of 10px, but it still shows up as pencil thin.

 

But  I am going to drop it for now and am concentrating on getting rid of all my tables (except those with data) that I brought over from the old system. This hasn't been easy either, but I've got it now as I understand the box, a wrap, div and how to position. Positioning was the hardest.

 

Don't fret tho, I will have a lot more questions... ;)

 

p.s. Don't look at the footer. Can't decide what to do with it. Any suggestions

Link to post
Share on other sites

What you should do is remove all internal and inline CSS in your files and work solely from external sheets.  Putting CSS in one place - especially while developing and testing - is far more beneficial than having it strewn about in several areas.  That way, if something goes wrong, you have at most two places (the HTML for the troublesome element(s) and the CSS for the styling) to look.  Even better, you'll have a far more concise way of asking questions about any problems you can't fix.

 

A good part of app development lies in organization.  There's even a term for it - Separation of Concerns.  This means that the different tiers of your app should remain as self-contained and separate from the others as possible, so a change in one level of your app doesn't necessitate a change in the others.  From a practical point of view relevant to your current project, this means separating page structure (the 'physical' parts of a page, its HTML elements) from page styling (the way it looks and where things go, its CSS) from page behavior (how it acts when a user acts upon it, its JavaScript).  This separation is achieved by using external stylesheets, external JavaScript libraries, and unobtrusive JavaScript techniques.

 

If you do your best to adhere to this principle, your life will be made much simpler as each component will be self-contained rather than intertwined with the others.  A failure/error in one will be far easier to spot and remedy.  Even for a project as small as yours, better code organization can go a long way.

Link to post
Share on other sites

What you should do is remove all internal and inline CSS in your files and work solely from external sheets.  Putting CSS in one place - especially while developing and testing - is far more beneficial than having it strewn about in several areas, ect., ect.

 

Well spoken. Sounds like Elementary Web Site Design 101.

 

I have been using internal style because I was having trouble with getting things to work with the external file. And I was anxious to get the pages fixed so I could get the site on the air and stop maintaining 2 sets of code (old and new). I do know that there are some duplicates and some conflicts between the external and internal. And there is some inline remaining simply as a result of bringing the old programs over as they were and then going back and fixing them.

 

I put the new site on the air a couple of days ago and need to fix a couple of pages that aren't working just right. Then I think I will stop and take your advice and consolidate all my css into the external file.

 

Damn, that is going to be a job!.. :'(

 

 

Link to post
Share on other sites

OFF TOPIC:

 

But since your website is aviation related, in case you or anyone else is interested . . .

 

The first flight of the 747-8 Intercontinental is supposed to happen this Sunday from Boeing's Everett, WA plant . . .

www.newairplane.com

 

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.