473,503 Members | 1,656 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Why doesn't the width match?

I'm wondering why my content and footer tables in this layout don't
match the header and menu - even though they're also set to 600 pixels
- both the CSS div's and the tables themselves. I can't see any
difference between the top image and menu tables, and the content and
footer. Other than that the latter two don't have images stretching
them to their full 600 px width.... hmm...

Page: http://jeffkirkey.com/test.html
CSS: http://jeffkirkey.com/jeffkirkey.css

Does this have anything to do with the code which I'm using to keep
things centered? Hope not - getting it to that point was frustrating
enough....

Any help appreciated - thanks!

Adam

Dec 1 '05 #1
4 2058
cosmo_canuck wrote:
I'm wondering why my content and footer tables in this layout don't
match the header and menu - even though they're also set to 600 pixels
- both the CSS div's and the tables themselves. I can't see any
difference between the top image and menu tables, and the content and
footer. Other than that the latter two don't have images stretching
them to their full 600 px width.... hmm...

Page: http://jeffkirkey.com/test.html
CSS: http://jeffkirkey.com/jeffkirkey.css

Does this have anything to do with the code which I'm using to keep
things centered? Hope not - getting it to that point was frustrating
enough....

Any help appreciated - thanks!


Hmmm. 17 HTML errors:

http://validator.w3.org/check?verbos....com/test.html

which includes non-standard tags and attributes.

Also, the DOCTYPE lacks the URL, so will trigger quirks mode in IE, and
as you know(?), IE gets the box model wrong unless it is IE6 and
standards mode is triggered.
Dec 1 '05 #2
cosmo_canuck wrote:
I'm wondering why my content and footer tables in this layout don't
match the header and menu - even though they're also set to 600 pixels
- both the CSS div's and the tables themselves. I can't see any
difference between the top image and menu tables, and the content and
footer. Other than that the latter two don't have images stretching
them to their full 600 px width.... hmm...

Page: http://jeffkirkey.com/test.html
CSS: http://jeffkirkey.com/jeffkirkey.css

Does this have anything to do with the code which I'm using to keep
things centered? Hope not - getting it to that point was frustrating
enough....

Any help appreciated - thanks!

Adam

table.table1 {
....
width:602px;
}

helps in Firefox, but i will not be the real answer...

Dec 1 '05 #3
Fixes it in Safari and IE 5 on the Mac too. But yes, it seems like an
unreliable solution...

As for C A Upsdell's comments, yes, there are nonstandard tags and I'm
still sorting out the DOCTYPE thing. I'm still trying to wrap my head
around CSS... and actually in this case I'm hoping to get some of the
benefits of CSS without going 100% table free. Apologies to the purists
but it's a challenge writing perfectly validated code!

Thanks for your help!

Dec 1 '05 #4
cosmo_canuck wrote:
I'm wondering why my content and footer tables in this layout don't
match the header and menu - even though they're also set to 600 pixels
- both the CSS div's and the tables themselves. I can't see any
difference between the top image and menu tables, and the content and
footer. Other than that the latter two don't have images stretching
them to their full 600 px width.... hmm...

It's mostly because of the weird mash of CSS and table-based/tag-soup
layout. Use CSS for styling, not tables.
The tables can be completely removed. They offer nothing except
increased bandwidth. The menu can be easily replaced with a <ul>.
See <http://css.maxdesign.com.au/listamatic/>.
Finally, use HTML 4.01 Strict. Transitional was only for migrating
legacy code to 4.01, then to Strict which disallows many of the attributes
you are using.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

Try this CSS. It styles the DIVs, not the tables:
p {}
tr,td { text-align:left; border: 0; padding: 0;}

table { width: 100%; }
table.table1 { }

#title, #menu, #content, #footer {
border: 1px black solid;
width: 600px;
margin-left:auto;
margin-right:auto;
}

#title, #menu {
border-top: 0;
border-bottom: 0;
}
#content, #footer { border-top: 0; }

#title img { vertical-align: bottom; }
#menu td { text-align:center; }

#content td, #footer td { padding: 0.5em; }
#content { background: #fff; }
#footer { background-color: gray; }
--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Dec 1 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
7189
by: Chewy509 | last post by:
Hi Everyone, I'll just start, and say I am not a PHP developer (I'm a sysadmin, who has gotten lumped with a non-working website). But since I like to do this type of stuff, I though I might...
3
2812
by: RBalbat | last post by:
Hello all, I have encountered an unexpected problem where if I render a table (in IE or Opera) and there are cells that contains URLs with long query strings, even though I specify the table...
1
2338
by: Michael Evanchik | last post by:
The following tag works fine in internet explorer, but in mozilla the image is not sized and left at its actualy size. Anyone know why? I though asp.net works on any browswer. ...
0
354
by: schapopa | last post by:
I have two nested datalists and I am using percentage to make the width of the row: So my header of the parent datalist looks like this... <table><tr> <td width = 5%> <td width = 12%>...
2
2532
by: VB Programmer | last post by:
I have several required field validators on each step of my CreateUserWizard. When I click Next it goes to the next step, even though the user hasn't typed anything in. I placed each "page"...
10
2313
by: patrick j | last post by:
Hi I'm wondering why my horizontal navigation lists don't align at the left in Opera as they do in IE6, IE7, Safari, Firefox and iCab? A URL with both of the horizontal lists is here: ...
2
1453
by: li72 | last post by:
Hi. I’m new to XForms society and struggling with a basic concepts. However, I’m trying to transform an xml doc into XForms using XSLT. The browser renders the Xforms just fine but there is no...
6
1818
by: ashraf02 | last post by:
hi i am trying to insert a record via a form using php and mysql and when i try to submit the form it comes up with the following error Column count doesn't match value count at row 1 if...
15
3046
by: colyn7 | last post by:
I really can't see what's wrong in my code... the submit() onChange doesn't work.. I've tried.. <select name="ddlTestCenter" id="ddlTestCenter" style="width:180px"...
0
7198
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7271
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7319
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7449
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4998
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4666
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1498
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
373
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.