HighDots Forums  

Table within a <div>

alt.html alt.html


Discuss Table within a <div> in the alt.html forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Paul Watt
 
Posts: n/a

Default Table within a <div> - 04-10-2006 , 11:11 AM






Hi,

i've placed a table within a <div> to dispay some data.
All is well in FF, but in MSIE the table starts inline with the bottom of
the <div> to the left. I've set the css div to vertical align: top, but this
hasn't made a differance.

http://www.paulwatt.info/test/calendar.htm

Thanks guys


--

Paul Watt
http://www.paulwatt.info



Reply With Quote
  #2  
Old   
mike@youell.net
 
Posts: n/a

Default Re: Table within a <div> - 04-10-2006 , 11:58 AM







Have you tried experimenting with CSS "margin" and "padding" also?

As these aren't always treated consistently across browsers.


Reply With Quote
  #3  
Old   
Paul Watt
 
Posts: n/a

Default Re: Table within a <div> - 04-10-2006 , 12:40 PM




<mike (AT) youell (DOT) net> wrote

Quote:
Have you tried experimenting with CSS "margin" and "padding" also?

As these aren't always treated consistently across browsers.

Sorted now, thanks. used negetive margins and the underscore hack in the
end.




Reply With Quote
  #4  
Old   
Paul Watt
 
Posts: n/a

Default Re: Table within a <div> - 04-10-2006 , 02:48 PM




"kchayka" <usenet (AT) c-net (DOT) us> wrote

Quote:
Paul Watt wrote:

used negetive margins and the underscore hack in the end.

Sounds very much like you are treating the symptoms, not the problem.
That is surely the wrong way to go about it.

What would you suggest?




Reply With Quote
  #5  
Old   
John Bokma
 
Posts: n/a

Default Re: Table within a <div> - 04-10-2006 , 03:21 PM



"Paul Watt" <paulioNOSPAM (AT) wattio (DOT) freeserve.co.uk> wrote:

Quote:
"kchayka" <usenet (AT) c-net (DOT) us> wrote in message
news:49vmelFqq2rnU1 (AT) individual (DOT) net...
Paul Watt wrote:

used negetive margins and the underscore hack in the end.

Sounds very much like you are treating the symptoms, not the problem.
That is surely the wrong way to go about it.


What would you suggest?
If it's an IE only issue (make sure that it really is) then you don't use
hacks, you use "conditional comments":

<http://virtuelvis.com/archives/2004/02/css-ie-only>

Hacks are ugly.

--
John

Net::Google and Perl: http://johnbokma.com/perl/net-google.html


Reply With Quote
  #6  
Old   
Jim Moe
 
Posts: n/a

Default Re: Table within a <div> - 04-10-2006 , 04:10 PM



Paul Watt wrote:
Quote:
i've placed a table within a <div> to dispay some data.
All is well in FF, but in MSIE the table starts inline with the bottom of
the <div> to the left. I've set the css div to vertical align: top, but this
hasn't made a differance.

http://www.paulwatt.info/test/calendar.htm

IE does not always correctly flow blocks. I'm a little vague on the
specifics but IIRC it miscalculates the available horizontal space
thinking there is not enough for, say, a table whose width is 100%.
A couple of things to try:
1. Float the .content div
2. Set the table's width to less than 100%, or do not use a width at all

BTW "vertical-align: top" is meaningless for a div.

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)


Reply With Quote
  #7  
Old   
dorayme
 
Posts: n/a

Default Re: Table within a <div> - 04-10-2006 , 05:50 PM



In article <Xns97A19213950B0castleamber (AT) 130 (DOT) 133.1.4>,
John Bokma <john (AT) castleamber (DOT) com> wrote:

Quote:
If it's an IE only issue (make sure that it really is) then you don't use
hacks, you use "conditional comments":

http://virtuelvis.com/archives/2004/02/css-ie-only

Hacks are ugly.
Well, maybe it is a matter of taste... on reflection, are hacks
per se ugly, and does it matter? What matters objectively is that
something relatively simple works, that it is not going to be a
nuisance later. This latter possibility is a serious one.

Ugly is in the eye of the beholder on this one, I don't find them
that ugly, they have been cleverly found and work and I am
reminded of this when I see them and I look on admiringly. They
are simpler in many ways than making separate style sheets just
for this IE or that IE and IE in common.

I am not advocating them here. I just think it is a bit precious
to refrain from fighting something ugly (IE rendering standards)
in too prim and proper a manner. There is an argument here that
the remedy rather nicely fits the cause.

And really, when push comes to shove, they are broadly
conditional defences against specific nuisances.

--
dorayme


Reply With Quote
  #8  
Old   
John Bokma
 
Posts: n/a

Default Re: Table within a <div> - 04-10-2006 , 06:30 PM



dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:

Quote:
In article <Xns97A19213950B0castleamber (AT) 130 (DOT) 133.1.4>,
John Bokma <john (AT) castleamber (DOT) com> wrote:
[..]

Quote:
Hacks are ugly.

Well, maybe it is a matter of taste...
No it isn't. If you can do the same thing with a conditional comment, do
it with a conditional comment.

--
John Experienced (web) developer: http://castleamber.com/

Textpad quick reference card (pdf): http://johnbokma.com/textpad/


Reply With Quote
  #9  
Old   
dorayme
 
Posts: n/a

Default Re: Table within a <div> - 04-10-2006 , 06:43 PM



In article <Xns97A1B20EE9C4Bcastleamber (AT) 130 (DOT) 133.1.4>,
John Bokma <john (AT) castleamber (DOT) com> wrote:

Quote:
dorayme <doraymeRidThis (AT) optusnet (DOT) com.au> wrote:

In article <Xns97A19213950B0castleamber (AT) 130 (DOT) 133.1.4>,
John Bokma <john (AT) castleamber (DOT) com> wrote:

[..]

Hacks are ugly.

Well, maybe it is a matter of taste...

No it isn't.
Yes it is.

--
dorayme


Reply With Quote
  #10  
Old   
GreyWyvern
 
Posts: n/a

Default Re: Table within a <div> - 04-10-2006 , 07:33 PM



And lo, John Bokma didst speak in
alt.html,alt.http://www.webmaster,comp.infosystem...style sheets:

Quote:
dorayme wrote:

John Bokma wrote:

[..]

Hacks are ugly.

Well, maybe it is a matter of taste...

No it isn't. If you can do the same thing with a conditional comment, do
it with a conditional comment.
IIRC, IE/Mac does not support IE conditional comments. If you are
comfortable with excluding that (small and shrinking) market share, then
yesh, conditional comments are preferable to IE hacks.

Grey

--
The technical axiom that nothing is impossible sinisterly implies the
pitfall corollary that nothing is ridiculous.
- http://www.greywyvern.com/orca#search - Orca Search - PHP/MySQL site
search engine


Reply With Quote
Reply




Thread Tools
Display Modes

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

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.