virtualadz Posted June 2, 2006 Share Posted June 2, 2006 an alternative way for it using css: the tr's and td's will appear more than 100 times!, that's why <html><head><title>W3schools</title><style type="text/css">td.TGLOSS {font-family: arial, verdana;font-size: 11px;color: #333333;</style></head><body><table borderColor=#ffffff cellSpacing=0 borderColorDark=#ffffff cellPadding=0 width=474 borderColorLight=#ffffff border=1> <tr> <td class="TGLOSS" borderColor=#008000 borderColorLight=#c0c0c0 align=left width=103 borderColorDark=#ffffff height=30> Agony of the leaves</td> <td class="TGLOSS" borderColor=#008000 borderColorLight=#c0c0c0 width=355 borderColorDark=#ffffff>This is a description of the relaxation of curled leaves during steeping.</td> </tr></table> </body></html> Link to comment Share on other sites More sharing options...
pulpfiction Posted June 2, 2006 Share Posted June 2, 2006 Hi,Is there somthing you wanted to ask? or is this just a statement??? Link to comment Share on other sites More sharing options...
virtualadz Posted June 2, 2006 Author Share Posted June 2, 2006 sorry, for not being clear, i needed to move all the info from td and tr using css, the tr and td will appear more than 100 times so it's better to use css. so how do i define those td & tr attributes using css. Link to comment Share on other sites More sharing options...
pulpfiction Posted June 2, 2006 Share Posted June 2, 2006 Just write the styles for td or tr,td{font-family: arial, verdana;font-size: 11px;color: #333333;}tr{font-family: arial, verdana;font-size: 20px;color: Dimgray;}This will work for all the td's and tr's you will use in the page... Link to comment Share on other sites More sharing options...
virtualadz Posted June 2, 2006 Author Share Posted June 2, 2006 well i can't use simply td and tr , i have 1000's in other pages, i will have to embed my default stylesheet in this page. but that's not the question:i already made the text relevant details using css, how do i make these through cssborderColor=#008000 borderColorLight=#c0c0c0 align=left width=103 borderColorDark=#ffffff height=30, i want these attributes to be defined in the css Link to comment Share on other sites More sharing options...
scott100 Posted June 2, 2006 Share Posted June 2, 2006 i needed to move all the info from td and tr using css, the tr and td will appear more than 100 times so it's better to use css. so how do i define those td & tr attributes using css.<{POST_SNAPBACK}> You know it's still ok to use tables, they have not been depricated...You say you needed to move all the info, why is that? is there as specific reason or is it just because you don't wan't to use tables?W3 recomends using css for page layouts, it sounds as if you have tabular data, tables should still be used for tabular data. I would use tables for your 100 items and style the tables with css. Link to comment Share on other sites More sharing options...
virtualadz Posted June 3, 2006 Author Share Posted June 3, 2006 is there a way doing it with div's and with complete css. Link to comment Share on other sites More sharing options...
scott100 Posted June 4, 2006 Share Posted June 4, 2006 is there a way doing it with div's and with complete css.<{POST_SNAPBACK}> You could try:<div><span>Agony of the leaves</span><span> This is a description of the relaxation of curled leaves during steeping.</span></div>with css in the header.div{width:784px}span{width:50%} Link to comment Share on other sites More sharing options...
Err Posted June 5, 2006 Share Posted June 5, 2006 You can just use CSS that nests in other tags so you can only affect the tables you want... like: div class="div1" > table > td Where "div class='div1' " would be the first css element in your css where it can set rules to things INSIDE the div to narrow down which tag you want to affect... like so: .div1 table td {Your Elements here}But here's what I can do with your code:css: .table_class { border-collapse: collapse; margin: 0; padding: 0; width: 474px;}.table_class td { border: 1px solid white; width: 335px; height: 10px; text-align: left; font-family: arial, verdana; font-size: 11px; color: #333333;}.table_class tr { [tr classes here]} html: <table class="table_class"> <tr> <td borderColor="#008000" borderColorLight="#c0c0c0" borderColorDark="#ffffff">Agony of the leaves</td> <td borderColor="#008000" borderColorLight="#c0c0c0" borderColorDark="#ffffff">This is a description of the relaxation of curled leaves during steeping.</td> </tr></table> That's just my 43 cents Link to comment Share on other sites More sharing options...
virtualadz Posted June 5, 2006 Author Share Posted June 5, 2006 is there a way to also move the bordercolor and other such border color attributes from td to css. Link to comment Share on other sites More sharing options...
aleksanteri Posted June 5, 2006 Share Posted June 5, 2006 Yes!Let me demonstrate it. <html><head><style type="text/css">table.examp_table, td{border-color: #00f;}</style></head><body><table border="2" class="examp_table"><tr><td>Cell 1</td><td>Cell 2</td></tr><tr><td>Cell 3</td><td>Cell 4</td></tr></table></body></html> Check this page for a reference to CSS borders Link to comment Share on other sites More sharing options...
virtualadz Posted June 5, 2006 Author Share Posted June 5, 2006 but there ain't any bordercolordark and bordercolorlight Link to comment Share on other sites More sharing options...
scott100 Posted June 5, 2006 Share Posted June 5, 2006 but there ain't any bordercolordark and bordercolorlight<{POST_SNAPBACK}> I don't think you should be using these, even Microsoft say so Is this the effect you are trying to achieve, use inset/outset: http://www.w3schools.com/dhtml/tryit.asp?f...=trydhtml_menu5 Link to comment Share on other sites More sharing options...
virtualadz Posted June 18, 2006 Author Share Posted June 18, 2006 ok, thanks Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now