You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@struts.apache.org by "Frank W. Zammetti" <fz...@omnytex.com> on 2006/01/03 17:41:41 UTC
Re: [OT] If you hate positioning with css raise your hand...
actually some help:)
No, you are not alone :)
I too have found it to be, shall we say, not as straight-forward as
table-based layouts. And I am relatively conversant in CSS (no guru or
anything, but I can usually make it to do what I want in the end).
Of course, the benefits are pretty obvious (anyone as yet unconvinced just
needs to spend a few minutes a www.csszengarden.com). But, my experience
echoes yours... it takes considerably more time to do things. This, I
think, one of those areas where good tooling can help. Even if you just
get the layout right in an editor and then copy over the CSS and edit by
hand after that, it's a big help (I still open up Dreamweaver every now
and again for an especially tricky table layout).
I would even go so far as to ask, aside from the obvious benefit of being
able to change the look and feel of a site by pointing to a new
stylesheet, what is the problem with table-based layouts? Is the easy
swapping of stylesheets the only real reason everyone is on the CSS
bandwagon? I suppose limited browsers like cell phones probably don't do
so well with tables, especially when they are numerous and highly nested
and such, but is the CSS support really up-to-snuff on those devices
enough to warrant full CSS designs?
Unfortunately, I don't have an answer to your specific "how-to"
question... As is usual with CSS, I would have to go play for a while to
get it right, and you are already doing that :)
--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com
AIM: fzammetti
Yahoo: fzammetti
MSN: fzammetti@hotmail.com
On Tue, January 3, 2006 11:06 am, Rick Reumann said:
> I always end up with nothing but trouble trying to position divs with
> css that is a BREEZE to do with tables. css positioning is supposed to
> be the layout savior yet my experience with it always ends up with
> headaches - try something, see if it works, try something else, set if
> it works. Oh and then make sure it's ok in all browsers.. and make sure
> it works with html strict, bla bla. Anyone else have these frustrations
> as well or is it just me?
>
> Anyway, since I started down this stupid path, maybe someone can help.
> yea, I know wrong list, but I'm being lazy..
>
> What I just want as a test is a div with a border around it and then two
> divs inside that div with text = One set of text aligned in a div to the
> left, the other in a div text-aligned to the right. Then below the main
> div some text:
>
> -----------------------------------
> | [left] [right] |
> -----------------------------------
> link1
> link2
>
>
> My first shot was:
>
> <body>
> <div style="border:1px solid black;">
> <div style="float:left;">[left]</div>
> <div style="float:right;text-align:right;">[right]</div>
> </div>
>
> link1<br/>
> link2<br/>
> </body>
>
> The above ends up with the next set of links aligning up next to the
> right div and only a top border on the enclosing div.
>
> Now this one sort of works. I still get only a top border on the
> enclosing div. And I don't see why I need to use <br/> tags to get this
> to work.
>
> <body>
> <div style="border:1px solid black;">
> <div style="float:left;">[left]</div>
> <div style="float:right;text-align:right;">[right]</div>
> </div>
>
> <br/><br/>
>
> link1<br/>
> link2<br/>
> </body>
>
> Any ideas how to get what I want?
>
> I just really stink at this css stuff and the web sites all seem to use
> different techniques and none of them intuitive. This site has some nice
> samples http://tutorials.alsacreations.com/modeles/ but often the way
> it's implemented seems crazy to me (ie having to add huge margins and
> have other divs fill into those margins, etc).
>
> If divs are the answer why are they so annoying to position?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org
Re: [OT] If you hate positioning with css raise your hand... actually some help:)
Posted by Michael Jouravlev <jm...@gmail.com>.
On 1/3/06, Frank W. Zammetti <fz...@omnytex.com> wrote:
> I would even go so far as to ask, aside from the obvious benefit of being
> able to change the look and feel of a site by pointing to a new
> stylesheet, what is the problem with table-based layouts? Is the easy
> swapping of stylesheets the only real reason everyone is on the CSS
> bandwagon? I suppose limited browsers like cell phones probably don't do
> so well with tables, especially when they are numerous and highly nested
> and such, but is the CSS support really up-to-snuff on those devices
> enough to warrant full CSS designs?
Limited browsers should not try to interpret CSS instructions they do
not understand. In this case the structural elements will be shown one
by one, in the order.
CSS is also great for creating a different stylesheet for printing
because you usually don't want to print out a whole table with
navigation, ads and other junk.
I think that transitional design with a big table with two or three
big cells works reasonably well.
I am not a pro in CSS (yet), but I was sold on proper structural XHTML
more than a year ago. Sadly, my own pages are not as good as I want
them to be.
Michael.
---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org