HighDots Forums  

How to comply with all...I'm stuck!

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


Discuss How to comply with all...I'm stuck! in the Cascading Style Sheets forum.



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

Default How to comply with all...I'm stuck! - 08-19-2003 , 04:32 AM






Hi All,

I have a problem to solve.

I have a table whose rows can be either in edit or view mode. For that
I need to toggle the visibility and the display of both of them. I had
all of this working in MSIE 5.5...but I thought it would be a lot
better if I could make it work in Opera. And I made it work...it took
some code refining, adjusting firmly to w3 standards but...I end up
with a solution that was working in Opera 7 but not working in IE 5.5.
And from what I have seen in forums, the solotion for Opera 7 its not
supported by MSIE...

This is a mockup of my code in Opera:
<table>
<tr style="visibility: visible; display: table-row">
<td> Some data</td>
</tr>
</table>

whereas in MSIE I would use display: inline...

I inmediately thought of browser sniffing...but that means keeping two
sets of code for the javascript file ...and then I have to take care
too of the embedded styles in the html pages. This puts me off a bit.
I would also like to achieve the ideal of one code works for both...

I have been playing with the idea of not using a table and using divs
instead of rows...but I would like to keep it in that way...
Has anyone got any idea of how can I do it keep the rows, and make it
work both in Opera and MSIE? That would be very useful? Has anyone
solved this problem before?

Thanks in advance for your help!

Belen

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

Default Re: How to comply with all...I'm stuck! - 08-19-2003 , 01:12 PM






In article <904cc95d.0308190132.19d4d04c (AT) posting (DOT) google.com>,
belen (AT) netcom (DOT) no (belen) wrote:

Quote:
I have a table whose rows can be either in edit or view mode. For that
I need to toggle the visibility and the display of both of them. I had
all of this working in MSIE 5.5...but I thought it would be a lot
better if I could make it work in Opera. And I made it work...it took
some code refining, adjusting firmly to w3 standards but...I end up
with a solution that was working in Opera 7 but not working in IE 5.5.
And from what I have seen in forums, the solotion for Opera 7 its not
supported by MSIE...

This is a mockup of my code in Opera:
table
tr style="visibility: visible; display: table-row"
td> Some data</td
/tr
/table

whereas in MSIE I would use display: inline...
I advice to do something more simple:

<tr id="row" class="show">

..show { display: block; } /* or whatever CSS rocks your boat */

Then use document.getElementById("row").className="hide"; to change the
CLASS value of that row. This is using JavaScript to access the DOM
(Document Object Model). W3 recommendations material, so use and be part
of the bigger whole and have amazing stories to tell your friends. In
the CSS you have specified how that class is supposed to work out:

..hide { display: none; }

Quote:
I inmediately thought of browser sniffing...but that means keeping two
sets of code for the javascript file ...and then I have to take care
too of the embedded styles in the html pages. This puts me off a bit.
I would also like to achieve the ideal of one code works for both...
If you want to look retro or just old, it is ok to use multiple versions
of documents, catered to quirks of "both browsers".

Quote:
I have been playing with the idea of not using a table and using divs
instead of rows...but I would like to keep it in that way...
You should use whatever element is appropriate to the content. And also,
not make the page depend on the widget you are trying to make. Like, I
can do with reading a table of departure/arrival times; colors on the
rows would be nice. Just to illustrate this idea.

Quote:
Has anyone got any idea of how can I do it keep the rows, and make it
work both in Opera and MSIE? That would be very useful? Has anyone
solved this problem before?
Opera 7 and up, yes. Opera 6 sucks at JavaScript. Another reason why the
page should not depend on it.

--
Kris
kristiaan (AT) xs4all (DOT) netherlands (nl)
"We called him Tortoise because he taught us" said the Mock Turtle.


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.