Solved

Please view my page

Posted on 1998-07-25
2
149 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article explains how to prepare an HTML email signature template file containing dynamic placeholders for users' Azure AD data. Furthermore, it explains how to use this file to remotely set up a department-wide email signature policy in Office …
In this tutorial viewers will learn how to define a gradient in CSS. Create a new HTML document with an internal stylesheet.: Create a div in CSS and name it Gradient. Define the background as "linear-gradient(to right, #ee3668, black)". Ensure you …
In this tutorial viewers will learn how to position items using CSS's three positioning types Create a new HTML document with an internal stylesheet.: Create another div in CSS and name it Absolute : Type "position:absolute;" and "top:10px; left:50p…

759 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

19 Experts available now in Live!

Get 1:1 Help Now