HTML gurus!

Everything else that doesn't fall into one of the other PB categories.
USCode
Addict
Addict
Posts: 924
Joined: Wed Mar 24, 2004 11:04 pm
Location: Seattle

Re: HTML gurus!

Post by USCode »

Thanks for all the terrific help everyone! :D
naw
Enthusiast
Enthusiast
Posts: 573
Joined: Fri Apr 25, 2003 4:57 pm

Re: HTML gurus!

Post 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
Ta - N
mrjiles
Enthusiast
Enthusiast
Posts: 238
Joined: Fri Aug 18, 2006 7:21 pm
Location: IL

Re: HTML gurus!

Post 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>
Post Reply