Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

css NS problem

Status
Not open for further replies.

safra

Technical User
Jan 24, 2001
319
NL
Hi,

This is a table / css issue.

Untill now I just sticked to tables to layout my pages. However both for efficiency purposes and to start learning more about css and page layout I am trying to do something fairly simple, at least that is what I think.

I have a pretty big number of rows pulled from a database. I need to display them row by row. The layout could be divided in 2 columns. However as the rows are pulled from a database and as I would like horizontal borders, I like to print them row by row. A simple test example can be viewed at
It looks ok in IE but in NS the border on the second column is ignored and the width is also ignored?

How can I get this to work cross-browser?

Thanks,
Ron
 
<style>
.c1{width:160px;height:20px;border-top:solid 1px #000000;};
.c2{width:300px;height:20px;border-top:solid 1px #666666;};
</style>


take the semicolons away at the end of each line in your STYLE tags. This should get your borders showing up correctly.

Not sure why the width is being ignored though - I'll just add it to my ever growing list of reasons for disliking Netscape :)


Tony
reddot.gif WIDTH=500 HEIGHT=2 VSPACE=3

 
Thanks Tony, that worked!

Now I am pretty curious how to set the width correctly in NS. If this is not possible how can one use css cross-browser instead of tables to design your pages? This is what we all are supposed to do in the future, aren't we?

Ron
 
I'll be interested to discover where from you found
support for this?
<<<
use css cross-browser instead of tables to design your pages? This is what we all are supposed to do in the future, aren't we?
>>>
thanks
 
As I said, untill now I haven't paid really much attention to this but discussions about using css or tables for layout have been there for a while. Just search google for &quot;css vs tables&quot; or something like that.

I have a pretty big page. I am experimenting with this now as I think using css instead of tables will keep the size smaller. However if can't even set the width I think I will stich with tables.

Ron
 
I think the real ideat is not to use tables where it is inappropriate to do so - not a complete replacement. Your example looks like genuine tabular data, for which the HTML <table> is intended (and should still be used).

The &quot;problem&quot; is where tables are used to lay out a HTML page into columns and rows - say a navigation menu down one side, a title across the top and content in the rest. This hard-codes the presentation of your page into its content and can (allegedly) confuse people using screen readers if not coded correctly.

Personally I'm a lot less dogmatic. Tables-for-layout can still be a powerful tool, though with the advent of CSS it's no longer the only tool in the box.

-- Chris Hunt
 
Thanks Chris,

I decided to stick with tables with this as you are right about what I am trying to do. Hope the page will not become to big in size.



 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top