CSS and Table problem

This is a discussion on "CSS and Table problem" within the Web Page Design section. This forum, and the thread "CSS and Table problem are both part of the Design Your Website category.


 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices




Reply
 
LinkBack Thread Tools
  #1  
Old Jul 25th, 2005, 13:20
New Member
Join Date: Jul 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
CSS and Table problem

I am having a bit of a problem with some text placement after a table has been displayed. the problem is namely in IE and not in Firefox and its driving me crackers, though I am sure I have overlooked something really simple.

Whats happening is that after inserting a table, text contained in the

tags following the table appear squashed up in the space to the right of the table instead of below it.

Have a look at this code:



This is some text data</p>
<table>
<tr>
<td>Cell 1</td>
</tr>
</table>


Some more text</p>

Simple enough you might think, so what I need to know is why it is coming out like:

This is some text data

[ Cell 1 ] Some more text data


I have tried everything I can think of -

tags around the table, line breaks, css 'display: block', auto margins on the table, table contained in its own div, and nothing appears to work. Any ideas? I think it is a css problem, but I am not 100% sure.



Anyone come across this before?

Cheers

Mike.[/code]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Jul 25th, 2005, 13:26
Highly Reputable Member
Join Date: May 2005
Location: U.K
Age: 21
Posts: 739
Thanks: 0
Thanked 0 Times in 0 Posts
i previed the code in ie and i didnt see a problem....
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Jul 25th, 2005, 13:44
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
is there a float:left applied to the table somehow?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Jul 25th, 2005, 13:47
New Member
Join Date: Jul 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
Its more to do with the CSS I think. I was reluctant to post it as it is quite big, but I have copied it onto our external server so you can have a look.

html:

http://www.leedshis.nhs.uk/test/

and css:

[/url]http://www.leedshis.nhs.uk/test/stylesheet/website.css[/url]
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #5  
Old Jul 25th, 2005, 14:00
Rob's Avatar
Rob Rob is online now
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,189
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
for anybody with 'really' long pieces of code to post, please use our pastebin and place the pastebin supplied link within the post.

The benfit of this method, is that people can make changes to your code and supply you with a modified version of it(via a different pastebin url)
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #6  
Old Jul 25th, 2005, 14:10
New Member
Join Date: Jul 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
In reply to D3mon - No, there is a float right applied to the quicklink in the top right, but thats the only float there is.

Cheers

Mike
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #7  
Old Jul 25th, 2005, 16:27
benbacardi's Avatar
Highly Reputable Member
Join Date: Feb 2004
Location: United Kingdom
Age: 20
Posts: 611
Thanks: 0
Thanked 0 Times in 0 Posts
could you not place a <br clear="all"> before the

tags? or maybe put clear="all" into the

tag, i dont know if that works or not.......?
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #8  
Old Jul 25th, 2005, 22:27
Reputable Member
Join Date: Aug 2003
Location: United Kingdom
Posts: 341
Thanks: 0
Thanked 0 Times in 0 Posts
The table has been set to align="left", which is the HTML equivalent of the CSS style="float:left". Take that out and you'll be back on track.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #9  
Old Jul 26th, 2005, 11:49
New Member
Join Date: Jul 2005
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
You are a star! Cheers. I had almost torn out what little heair I have left. Something so simple can cause so many problems.

Is there any way to override this in CSS so that it cannot happen again? The reason I say that is our users create some the bit between body tags with a visual web based editor (an older version of htmltag).

Cheers

Mike.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #10  
Old Aug 3rd, 2005, 03:38
herkalees's Avatar
Highly Reputable Member
Join Date: Jul 2005
Location: Massachusetts, USA
Age: 87
Posts: 576
Thanks: 0
Thanked 0 Times in 0 Posts
Quote:
Originally Posted by lisnalinchy
Is there any way to override this in CSS so that it cannot happen again? The reason I say that is our users create some the bit between body tags with a visual web based editor (an older version of htmltag).
Sorta, you could declare all tables to have float:none; inside your CSS file, but it might be overridden if align=left is placed in the html code by your users, since it is more top-level than the external CSS style sheet.

I guess you can only try?

Add this to your CSS sheet:
Code: Select all
table {float:none;}
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #11  
Old Aug 3rd, 2005, 09:54
Rob's Avatar
Rob Rob is online now
Webforumz Founder
Join Date: Jul 2003
Location: Southern UK
Age: 34
Posts: 3,189
Blog Entries: 7
Thanks: 27
Thanked 23 Times in 20 Posts
Unfortunatly, inline styles take precedence over external CSS 95% of the time.... so you'll have to make changes to all the tables by hand.
__________________
Click the 'Thanks!' button if this post has helped you

Rob - Webforumz Founder
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
css, table, problem

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Iframe / Table Problem.... help me!!! bigbluesky2006 Web Page Design 4 Dec 16th, 2006 10:59
Table conversion problem dartiss Web Page Design 9 Jul 26th, 2006 17:42
Table Problem? ivan Web Page Design 8 Mar 1st, 2006 09:31
Table sizing problem Jaken Veina Web Page Design 1 Jan 6th, 2006 22:06
Expandable Table Problem legomaniac Web Page Design 3 Jul 15th, 2005 14:16


All times are GMT. The time now is 18:34.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42