Page 2 of 2

Re: HTML gurus!

Posted: Thu Oct 28, 2010 6:12 pm
by USCode
Thanks for all the terrific help everyone! :D

Re: HTML gurus!

Posted: Mon Nov 01, 2010 11:13 am
by naw
Using the STYLE parameter, you can apply CSS properties inline with your HTML:

<TABLE BORDER=2 WIDTH=50% HEIGHT=20% STYLE="font-family: arial; font-size: 14px; color: blue; text-align: right">
<TR STYLE="background-color: yellow; text-align: center;"> <TH> Head1 <TH> Head2 <TH> Head3 </TR>
<TR> <TD> Data1 <TD> Data2 <TD> Data3 </TR>
<TR> <TD> Data4 <TD COLSPAN=2> Data2&3 </TR>
</TABLE

Re: HTML gurus!

Posted: Thu Dec 02, 2010 9:43 pm
by mrjiles
Wow, old thread but nobody went all in on CSS so here ya go!

Code: Select all

<html>
	
	<head>
		<style type="text/css">
			<!--
				#table {display:table; font-family:Verdana; font-size:14px; width:500px; border:solid 1px #000;}
				#heading {font-weight:bold; font-size:16px; text-align:center;}
				.row {display:table-row;}
				.yellow {display:table-cell; border:solid 1px #000; background-color:yellow;}
				.blue {display:table-cell; border:solid 1px #000; background-color:blue;}
				.purple {display:table-cell; border:solid 1px #000; background-color:purple; text-align:center; color:red;}
			-->
		</style>
	</head>
	
	<body>

		<div id="table">
			<div id="heading" class="row">
				<span class="blue">Month</span>
				<span class="yellow">Savings</span>
			</div>
			<div class="row">
				<span class="blue">January</span>
				<span class="yellow">$100</span>
			</div>
			<div class="row">
				<span class="purple">February</span>
				<span class="purple"></span>
			</div>
			<div class="row">
				<span class="blue">March</span>
				<span class="yellow">$300</span>
			</div>
		</div>

	</body>
</html>