Solved

Please view my page

Posted on 1998-07-25
2
159 Views
Last Modified: 2010-04-09
Hi,

I have asked some questions about borders in the past and this is my latest one. I wanted to add some text to the stripe of my pages and everything moved to the right. Although I have solved the problem, I like to know why this happens (and why my solution works).

Please view my site and see what I mean.
The URL: http://members.xoom/wimkerk/border.html

Thanks
0
Comment
Question by:wimkerk
2 Comments
 
LVL 8

Accepted Solution

by:
jbirk earned 190 total points
ID: 1844887
Well, I looked at your pages, and here are the problems:
1. The first page where you have no text in the left td, the width of that cell is being displayed as less than 140 because there isn't enough text to force it to the correct width.  You just got lucky that it ended up displayed the way you wanted it to.
2. The second page is actually displaying 140 width td cell, that is why it doesn't fit into a 131 pixel green bar.
3. The 10 pixels of the cellspacing and the 1 pixel of the table border have not been accounted for.
4. The margin width of the window also has not been accounted for.
5.  The actual width of the green bar is 129 with a 2 pixel darker green after it.  This 2 pixel darker green doesn't look as good when it's INSIDE the td, but rather when it's part of the border, so 129 should be the number to go by.
6. You forgot to say cellspacing=0 in the table, which is defaulted to 1

SO, if we take the 129, subtract 10 for cellspacing, 2 for border (border on both sides), 7 for window margin (that's what it seems to be in Netscape 4.05, but is different from browser to browser), we get: 109, which is the correct size of the td cell for the left.

That's why it is doing what's it's doing.
Hope this helps,
Josh
0
 

Author Comment

by:wimkerk
ID: 1844888
Thanks jbirk. It is really clear where I went wrong. A well deserved "A".

Thanks again!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
Finding original email is quite difficult due to their duplicates. From this article, you will come to know why multiple duplicates of same emails appear and how to delete duplicate emails from Outlook securely and instantly while vital emails remai…
In this tutorial viewers will learn how to style a corner ribbon overlay for an image using CSS Create a new class by typing ".Ribbon":  Define the class' "display:" as "inline-block": Define its "position:" as "relative": Define its "overflow:" as …
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now