Solved

Please view my page

Posted on 1998-07-25
2
185 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Hide file extensions in Notepad++ tabs 2 78
Html date format 9 28
close pop up windows when logout or main window closes 17 84
transfer content to new site design 7 44
When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)

738 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