HighDots Forums  

From table to css on IE6...

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss From table to css on IE6... in the Cascading Style Sheets forum.



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

Default From table to css on IE6... - 08-20-2006 , 05:06 PM






Hello,

For the "shows" listing on my band's homepage I use tables. See the
page at
http://deimos.curious.be/~dusk/v2/shows.php

Since we aren't exactly dealing with "tabular data" here I wanted to
convert this exact layout using only divs, with css to position them.
This is what I came up with:
http://deimos.curious.be/~dusk/v2/showtable.html

Mission accomplished on FF, Opera and Konqueror, but IE6 of course
messes it up. For some reason the top and bottom row of divs is shifted
to the right. Any workarounds, or is there actually a bug in my css?

Tia
Tommy


Reply With Quote
  #2  
Old   
TomB
 
Posts: n/a

Default Re: From table to css on IE6... - 08-20-2006 , 05:21 PM






Nevermind, I just found a workaround myself. I removed the
text-align:center; from the encapsulating div and gave that property to
all the inner divs. It seems that IE not only centers text, but also
other elements (in casu: divs) when using text-align.
Too bad, because now my code is bloated thanks to IE...


Reply With Quote
  #3  
Old   
Stan R.
 
Posts: n/a

Default Re: From table to css on IE6... - 08-21-2006 , 11:55 AM



TomB wrote:
Quote:
Nevermind, I just found a workaround myself. I removed the
text-align:center; from the encapsulating div and gave that property
to all the inner divs. It seems that IE not only centers text, but
also other elements (in casu: divs) when using text-align.
Too bad, because now my code is bloated thanks to IE...
Isn't that correct behavior though?

According to my O REILLY CSS Pocket Reference, 2nd Ed, on page 93, for
text-align, "Applies to:" lists "Block-level elements", and DIVs are by
default block-level so it makes sense. So if the outer div uses
text-align: center; any block level element should be centered, so it
seems IE does that more correctly in this reguard. Please correct me if
I'm wrong though.

I do wish that with DIVs there was a much more clearer way to set
Horizonal and Vertical alignment for anything within a DIV, a la table
cells (and also appears right in all browsers, as wishful-thinking-eque
that mya be.)

--
Stan




Reply With Quote
  #4  
Old   
TomB
 
Posts: n/a

Default Re: From table to css on IE6... - 08-21-2006 , 06:59 PM




Stan R. schreef:

Quote:
TomB wrote:
Nevermind, I just found a workaround myself. I removed the
text-align:center; from the encapsulating div and gave that property
to all the inner divs. It seems that IE not only centers text, but
also other elements (in casu: divs) when using text-align.
Too bad, because now my code is bloated thanks to IE...

Isn't that correct behavior though?

According to my O REILLY CSS Pocket Reference, 2nd Ed, on page 93, for
text-align, "Applies to:" lists "Block-level elements", and DIVs are by
default block-level so it makes sense. So if the outer div uses
text-align: center; any block level element should be centered, so it
seems IE does that more correctly in this reguard. Please correct me if
I'm wrong though
You have got a point there, although out of some kind of "gut feeling"
I expected that the position of divs wouldn't be affected by
text-align...
But yes, IE seems te be doing the correct thing here. Blimey!



Reply With Quote
  #5  
Old   
Els
 
Posts: n/a

Default Re: From table to css on IE6... - 08-21-2006 , 07:08 PM



TomB wrote:

Quote:
Stan R. schreef:

TomB wrote:
Nevermind, I just found a workaround myself. I removed the
text-align:center; from the encapsulating div and gave that property
to all the inner divs. It seems that IE not only centers text, but
also other elements (in casu: divs) when using text-align.
Too bad, because now my code is bloated thanks to IE...

Isn't that correct behavior though?
No.

Quote:
According to my O REILLY CSS Pocket Reference, 2nd Ed, on page 93, for
text-align, "Applies to:" lists "Block-level elements", and DIVs are by
default block-level so it makes sense. So if the outer div uses
text-align: center; any block level element should be centered,
No. It means that you can give <div> and <p> (block level elements)
the text-align property. Not that it should center block level
elements inside of it. (it's not "blockelement-align", but
"text-align")

Quote:
so it
seems IE does that more correctly in this reguard. Please correct me if
I'm wrong though
Done ;-)

Quote:
You have got a point there, although out of some kind of "gut feeling"
I expected that the position of divs wouldn't be affected by
text-align...
But yes, IE seems te be doing the correct thing here. Blimey!
Your gut feeling was right though...

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/


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 - 2009, Jelsoft Enterprises Ltd.