473,385 Members | 1,325 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

vertical position of wide <table> in 3 column <div> css

I'm new(ish) to css, comfortable using tables, but trying real hard to move away.

Please see http://84.9.125.31/developer/css_test/test5.html

NB This issue is with IE & Opera - I've tried IE 6&7 and both have the same result. It works fine in FF. Thanks to Petr Stanicek for the original example.

As you can see the table is 800px wide in the middle column and it's vertical position is affected by the amount of text in the left or right hand columns - if the table is wider than the middle column, you may need your screen res set to 1024x768. If it's less than the width of the middle <div> the vertical position is fine.

Adding css position:absolute; to the '#left' spec works in that the table is now dispalyed at the correct vertical position in the middle column, see http://84.9.125.31/developer/css_test/test6.html , but the text in the left column flows out below the grid, defeating the object.

Given that there is a solution, the tables used will be any number of columns and could be a lot wider than 800px. I've seen a lot about non-standards compliance and display:table; BUT I'm more interested in the vertical position issue than the width/scrolling.

Any help/pointers would be greafully received.
May 11 '07 #1
12 4174
drhowarddrfine
7,435 Expert 4TB
Haven't tested to see if this is affecting it yet but the validator complains that <table> on line 115 is not allowed there.
May 11 '07 #2
Haven't tested to see if this is affecting it yet but the validator complains that <table> on line 115 is not allowed there.
Thanks for the quick response, I think this must have been because I had pasted the table inside the <p> tags. I've moved it ouside now and it validates wihtout errors.

Unfortunately this has not fixed the vertical position issues.
May 11 '07 #3
drhowarddrfine
7,435 Expert 4TB
I have to leave for a while.

I checked in IE7, Opera and FF and they all look the same to me. I don't think I quite understand where the table is to go. Is it to remain under all three columns or constrained to the middle but ride down as the left column expands?

IE has a bug where it expands divs to contain floated elements. FF honors the standard. IE, in general, screws up floats but it's all fixable.
May 11 '07 #4
Your table border doesn't resize in FF. When I shrink the borwser left, the right col data over-writes the table.

I have a simple 3 column design at www.hudsoft.com which doesn't do the same thing as yours (however I haven't converted it to CSS completely yet either).

It MAY be worth a look at least.

Regards, Greg.
May 14 '07 #5
I have to leave for a while.

I checked in IE7, Opera and FF and they all look the same to me. I don't think I quite understand where the table is to go. Is it to remain under all three columns or constrained to the middle but ride down as the left column expands?

IE has a bug where it expands divs to contain floated elements. FF honors the standard. IE, in general, screws up floats but it's all fixable.
To recreate the issue, simply click in the hyerplink to populate with longer text in the left (or right) column. The table is moved to exactly below the new height of the left (or right) column, non table text is left unaffected.

NB FF works correctly, the issue is in IE6&7 and Opera.
May 14 '07 #6
Your table border doesn't resize in FF. When I shrink the borwser left, the right col data over-writes the table.

I have a simple 3 column design at www.hudsoft.com which doesn't do the same thing as yours (however I haven't converted it to CSS completely yet either).

It MAY be worth a look at least.

Regards, Greg.
Thanks for the feedback Greg! I'm not too concerned about the right column overlapping the table - I'm looking at a solution to the width. The more worrying thing is the 'phantom space' of the vertical position. The www.hudsoft.com site uses a <table> around the whole grid which I was hoping to avoid.
May 14 '07 #7
drhowarddrfine
7,435 Expert 4TB
I still don't understand the issue. All browsers work the same to me. I did click on the longer and very long links.
May 14 '07 #8
I still don't understand the issue. All browsers work the same to me. I did click on the longer and very long links.
Thanks for your persistence drhowarddrfine!
1. I'm probably not explaining myself very well. Pls see below.
2. Your screen res might be higher than 1024x768, so in the first link in my original post, I have changed the <table> to be wider - it's now 1800px. Please try again.

In FF and Safari the table appears directly after the text 'This is content of the MIDDLE column. It can be short, longer or very long. PLS NO GAP AFTER.' in the middle column. This is how I'm trying to get it to appear in IE and Opera.

In IE & Opera the <table> appears with a space above it and the text 'This is content of the MIDDLE column. It can be short, longer or very long. PLS NO GAP AFTER.'

The size of the gap is exactly the same as the depth of the grey box on the left. So when you click the 'short', 'long', or 'very long' hyperlinks in the the grey box, the <table> moves down/up accordingly.

Phew, I hope that explains it better.
May 14 '07 #9
drhowarddrfine
7,435 Expert 4TB
I see it now and think I have a solution. Be back in a bit.

EDIT: Did you change anything? Since I posted this, I can't get it to break now. So weird.
May 14 '07 #10
I see it now and think I have a solution. Be back in a bit.

EDIT: Did you change anything? Since I posted this, I can't get it to break now. So weird.
No, nothing's changed. Just to avoid possible confusion, I'll delete the file in the second link (http://84.9.125.31/developer/css_test/test6.html) which demonstrates position:absolute; I can always put is back again if required. Link in question is http://84.9.125.31/developer/css_test/test5.html

Edit: I just tested again in FF and IE and they still behave (for me) as described.

PS. thanks for the help!
May 14 '07 #11
I see it now and think I have a solution. Be back in a bit.

EDIT: Did you change anything? Since I posted this, I can't get it to break now. So weird.
Having seen the issue, pls can you post your thoughts as to a solution. I'm about to start building a tables based solution.
May 16 '07 #12
drhowarddrfine
7,435 Expert 4TB
Going to tables would be to your determent. I just don't see the problem anymore so I'm questioning whether I ever really did or I just don't understand the issue. All the browsers look the same to me.
May 16 '07 #13

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Xah Lee | last post by:
with strict HTML spec, can one have <p> tags inside table's <td> tag? also, in strict XHTML, can one have <p> tages inside <div>? Thanks. Xah xah@xahlee.org ∑ http://xahlee.org/
61
by: Toby Austin | last post by:
I'm trying to replace <table>s with <div>s as much as possible. However, I can't figure out how to do the following… <table> <tr> <td valign="top" width="100%">some data that will...
1
by: Alan Hoyle | last post by:
I was using a <table border> to generate borders around some info/images, and decided to follow the w3c guidelines and convert it to CSS boxes with borders since it wasn't really tabular data. ...
8
by: slim | last post by:
hi again all, i am still working on the website as mentioned in earlier threads and have hit another snag... http://awash.demon.co.uk/index.php http://awash.demon.co.uk/vd.css the php is...
2
by: listaction | last post by:
Hi Folks, can you help me by explaining how the code below can be translated using <div> and achieve the same effect? Thanks, LA <html> <body> <table bgcolor="#000000" width="100%"...
4
by: Alan Silver | last post by:
Hello, I would like to know if it is possible to use a panel, but prevent it from adding a <div> tag to the HTML. The reason I want to do this is that I am using a panel to enable me to...
4
by: Alan Silver | last post by:
Hello, Please pardon what is probably a dumb question, but if I have HTML like this... <div> <h3>Ferrets</h3> </div> and CSS like this...
4
by: harryusa | last post by:
I am trying to center 2 images concentrically which are z-indexed to lay on top of each other making an image with a border from another image that has a transparent center. I need the images to be...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.