NYCPHP Meetup

NYPHP.org

[nycphp-talk] [OT] Yet another CSS Question

Peter Sawczynec ps at sun-code.com
Sat Mar 3 10:37:30 EST 2007


I believe it could be appropriate to used nested divs, as in roughly:

<div id="parent"
style="position:absolute;top:100px;left:270px;width:400px;height:300px;b
ackground-color:#eheheh;color:#333333;">
<div id="c1"></div><div id=c2"></div>
</div>

Some benefit(s) are you can position the parent div absolutely or
relatively, and set the width as a percentage (100%) or exact, such as
400px. Then the child divs when positioned can be positioned relative to
the parent x,y position on the page, if needed. And then use whatever
attributes work to position the child divs. Or you may find that you can
apply align or alignment properties to the content itself that is in the
child divs, such as text-align:right.

And just while I'm here. For those who like to sip their CSS, and use it
to help finely tweak the formatting of a page (especially text and
images that are within parent table(s): don't neglect the font/text
prosperities like text-decoration, text-align, line-height,
letter-spacing, font-weight, and font-style. These properties which used
to fail are actually nicely applied in modern browsers. E.g. this
baseline class when applied to a <div> or <td> tag will allow you to
really tune your text till it is quite perfect within your layout:

.pulloutcopy {
	font-family: Arial, Helvetica, sans-serif;
	font-size: 12px;
	color: #091016;
	font-weight: 900; /* value 900 = bold, 100 = book */
	font-style: normal; /* value oblique creates ital */
	text-decoration: none;
	line-height: 21px;
	
	padding-top: 0px;
      padding-right: 8px;
      padding-bottom: 0px;
      padding-left: 15px;
} 

Warmest regards, 
 
Peter Sawczynec 
Technology Dir.
Sun-code.com 
Web related services 
646.316.3678 
ps at sun-code.com


-----Original Message-----
From: talk-bounces at lists.nyphp.org [mailto:talk-bounces at lists.nyphp.org]
On Behalf Of Kenneth Downs
Sent: Friday, March 02, 2007 3:57 PM
To: NYPHP Talk
Subject: [nycphp-talk] [OT] Yet another CSS Question


OK, so let's say I'm trying to make an honest go of it and resist the 
urge to use TABLEs for non-tabular data.

So how do I handle this one?

I'd like to have two links on a page.   They should be on the same line 
together, one flush left, the other flush right.  The TABLE method is 
just to have two cells, but of course we don't want to do that.

What I tried was putting two divs, one after the other.  The 2nd one was

relative positioned with its height at -1em.  This did not work on IE 6,

and as I am using a downloaded template, as I twiddled I quickly 
realized I was going to make it a lot worse before it ever got better.

So right now I am using a TABLE  and wondering if anybody can teach a 
database guy yet another CSS trick.


P.S., you know I wonder if there is something about programmers, 
especially db guys, preferring that TABLE element, some kind of 
subconscious thing...

-- 
Kenneth Downs
Secure Data Software, Inc.
www.secdat.com / www.andromeda-project.org
Office: 631-689-7200   Cell: 631-379-0010

::Think you may have a problem with programming? Ask yourself this 
::question: do you worry about how to throw away a garbage can?

_______________________________________________
New York PHP Community Talk Mailing List
http://lists.nyphp.org/mailman/listinfo/talk

NYPHPCon 2006 Presentations Online
http://www.nyphpcon.com

Show Your Participation in New York PHP
http://www.nyphp.org/show_participation.php






More information about the talk mailing list