|
Posted by Barbara de Zoete on 09/27/33 11:31
On Wed, 09 Nov 2005 22:19:30 +0100, JSOUL <tkdREMOVESPAMinthecity@yahSPAMoo.com>
wrote:
> On Wed, 09 Nov 2005 15:24:59 -0500, JSOUL
> <tkdREMOVESPAMinthecity@yahSPAMoo.com> wrote:
>
>> While people complain about
>> the travesty of using tables, I'm finding CSS to be impossible to do
>> certain things easily and it's not easy to read. All I'm trying to do
>> is get two "cells" to line up properly. With a table it would be
>> simple:
>>
>> <table><tr><td> <img - for image #1> </td><td> Sample Text </tr>
>> </table>
<snipped some>
>> I used the inline tag everywhere to see if it works but it won't.
>> Here's the code:
<snipped the code>
> FIXED THIS ONE -- for some reason inline wasn't working initially and
> then I noticed a typo in this example when I tried it again.
You ask for 'two cells', then you talk about 'inline tags' (I assume you mean
the inline property you can use with selectors in css). These are two very
different things. The first, the cells, are part of tables, which with css can
be emulated with the value 'table-cell' for the display property. The second,
the inline property, makes an element behave in modern graphical browsers as if
it was, eh, yeaheh, an inline element. No cells there. Turns out your question
is a bit ambigu.
To your original question:
Did you actually even bother to look at the reply I posted? You might learn
something from it, God forbit.
> <div id="bannercontainer">
> <div id="logoleft"></div>
> <div id="bannerright">Sample Text</div>
> </div>
With me will only be:
<div id="bannercontainer">
<span><img><span>
<span>text</span>
</div>
With css I make those spans behave as if they are table cells. Go see the
example I pointed you to in the previous post.
You can address the spans in the above example using the selector
'#bannercontainer span' or the image directly with the selector
'#bannercontainer img' (for that you could even leave out the containing span
around the image). In short: by using proper markup with well chosen, logical
(decendent) selectors, you can simplify your code a bit, making it less hard to
read and maintain.
--
,-- --<--@ -- PretLetters: 'woest wyf', met vele interesses: ----------.
| weblog | http://home.wanadoo.nl/b.de.zoete/_private/weblog.html |
| webontwerp | http://home.wanadoo.nl/b.de.zoete/html/webontwerp.html |
|zweefvliegen | http://home.wanadoo.nl/b.de.zoete/html/vliegen.html |
`-------------------------------------------------- --<--@ ------------'
Navigation:
[Reply to this message]
|