table to css, fall at first hurdle

Discussion in 'HTML' started by foldface@yahoo.co.uk, Nov 24, 2003.

  1. Guest

    This appears with the first div as a small block (desired behaviour),
    but with the subsequent element on the next line (undesired behaviour) and the
    3rd div ignored (undesired behaviour).
    What am I doing wrong?
    What I want is to be able to specify an offset of any given size
    and also for elements to appear directly below each other, not with a gap


    <style type="text/css">
    DIV.clearLeft {clear:left; width:16; background-color: #dddddd;}
    DIV.left {float:left;}
    </style>

    <div class="clearLeft"></div>
    <div class="left"><input type="submit" value="Ignore"></input></div>
    <div clear="clearLeft"></div>
    <div class="left"><input type="submit" value="Ignore"></input></div>
     
    , Nov 24, 2003
    #1
    1. Advertising

  2. foldface wrote:

    > width:16;


    16 what? 16 pixels? 16 centimetres? 16 miles? 16 lightyears?

    If you just want a small coloured square by your inputs, why not just use
    <img/>?

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Nov 24, 2003
    #2
    1. Advertising

  3. Toby A Inkster wrote:
    > foldface wrote:
    >
    >> width:16;

    >
    > 16 what? 16 pixels? 16 centimetres? 16 miles? 16 lightyears?


    biscuits - 16 biscuits. I have my browser default set to chocolate hob-nobs
    and get really irritated when authors try to interfere with my preference
    ;o)

    --
    William Tasso - http://WilliamTasso.com
     
    William Tasso, Nov 24, 2003
    #3
  4. William Tasso wrote:

    > Toby A Inkster wrote:
    >> foldface wrote:
    >>
    >>> width:16;

    >>
    >> 16 what? 16 pixels? 16 centimetres? 16 miles? 16 lightyears?

    >
    > biscuits - 16 biscuits. I have my browser default set to chocolate hob-nobs
    > and get really irritated when authors try to interfere with my preference
    > ;o)


    You can fit 16 chocolate hobnobs across your screen?

    My screen is only about 5.5x4.0 hobnobs.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Nov 24, 2003
    #4
  5. While the city slept, Toby A Inkster <>
    feverishly typed:

    > William Tasso wrote:
    >
    >> Toby A Inkster wrote:
    >>> foldface wrote:
    >>>
    >>>> width:16;
    >>>
    >>> 16 what? 16 pixels? 16 centimetres? 16 miles? 16 lightyears?

    >>
    >> biscuits - 16 biscuits. I have my browser default set to chocolate
    >> hob-nobs and get really irritated when authors try to interfere with
    >> my preference ;o)

    >
    > You can fit 16 chocolate hobnobs across your screen?
    >
    > My screen is only about 5.5x4.0 hobnobs.


    Screen width is irrelevant. You have no idea how many hobnobs wide the user
    has their browser canvas set to.

    Cheers,
    Nige

    --
    Nigel Moss.

    Email address is not valid. . Take the dog out!
    http://www.nigenet.org.uk | Boycott E$$O!! http://www.stopesso.com
    In the land of the blind, the one-eyed man is very, very busy!
     
    nice.guy.nige, Nov 24, 2003
    #5
  6. nice.guy.nige wrote:
    > While the city slept, Toby A Inkster
    > <> feverishly typed:
    >
    >> William Tasso wrote:
    >>
    >>> Toby A Inkster wrote:
    >>>> foldface wrote:
    >>>>
    >>>>> width:16;
    >>>>
    >>>> 16 what? 16 pixels? 16 centimetres? 16 miles? 16 lightyears?
    >>>
    >>> biscuits - 16 biscuits. I have my browser default set to chocolate
    >>> hob-nobs and get really irritated when authors try to interfere with
    >>> my preference ;o)

    >>
    >> You can fit 16 chocolate hobnobs across your screen?
    >>
    >> My screen is only about 5.5x4.0 hobnobs.

    >
    > Screen width is irrelevant. You have no idea how many hobnobs wide
    > the user has their browser canvas set to.
    >


    A valid point and it's also good to remember the principles of flexible
    design so that the 16 hobnobs are available without horizontal scrolling no
    matter how wide the canvas or even if the visitor is accepting hobnobs -
    your visitor may prefer the cheese cracker.

    --
    William Tasso - http://WilliamTasso.com
     
    William Tasso, Nov 24, 2003
    #6
  7. William Tasso wrote:
    > A valid point and it's also good to remember the principles of flexible
    > design so that the 16 hobnobs are available without horizontal scrolling no
    > matter how wide the canvas or even if the visitor is accepting hobnobs -
    > your visitor may prefer the cheese cracker.


    What about chocolate-hating vegans?
     
    Leif K-Brooks, Nov 24, 2003
    #7
  8. William Tasso wrote:

    > A valid point and it's also good to remember the principles of flexible
    > design so that the 16 hobnobs are available without horizontal scrolling no
    > matter how wide the canvas or even if the visitor is accepting hobnobs -
    > your visitor may prefer the cheese cracker.


    But then the visitor *should* give Cheese Crackers a higher "q" value than
    Chocolate Hobnobs in the HTTP Biscuit-Accept header.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Nov 24, 2003
    #8
  9. Leif K-Brooks wrote:

    > What about chocolate-hating vegans?


    Hobnobs are full of butter so they're screwed either way.

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Nov 24, 2003
    #9
  10. Orson Guest


    > What I want is to be able to specify an offset of any given size
    > and also for elements to appear directly below each other, not with a gap


    After you have brushed the crumbs from your keyboard you might want to look
    at
    http://www.alistapart.com/articles/practicalcss/


    Orson
     
    Orson, Nov 25, 2003
    #10
  11. Toby A Inkster wrote:
    > Hobnobs are full of butter so they're screwed either way.


    Gracefully degrade to plain crackers, darn it!
     
    Leif K-Brooks, Nov 25, 2003
    #11
  12. Guest

    > After you have brushed the crumbs from your keyboard you might want to look
    > at
    > http://www.alistapart.com/articles/practicalcss/


    looked at it, doesn't answer this question though

    - Even if I place a '&nbsp;' within the clearing div block it doesn't
    work
    (albeit in a different way, now both empty'ish divs appear to be
    clear: both)
    - Ignore the pixel issue, I think its the default anyway but its not
    relevant to
    this cut down example

    The questions are:
    - Why is the 'float: left' on a different line? 'clear: left' seems to
    be acting like 'clear: both'
    - I want to start an element at some aritary left position without
    using
    absolute positioning (because it'll be in some container, probably a
    table, but
    anyway...) so to do this I was hoping to have an empty div element I
    can
    set the width on
     
    , Nov 25, 2003
    #12
  13. Toby A Inkster wrote:

    > foldface wrote:
    >
    >> width:16;

    >
    > 16 what? 16 pixels? 16 centimetres? 16 miles? 16 lightyears?


    I meant this in all seriousness -- you do need to specify a unit -- not
    just "16".

    --
    Toby A Inkster BSc (Hons) ARCS
    Contact Me - http://www.goddamn.co.uk/tobyink/?page=132
     
    Toby A Inkster, Nov 25, 2003
    #13
  14. Guest

    This is quite good:
    http://www.complexspiral.com/publications/containing-floats/

    This is more or less what I was after. I notice that if I replace
    'class="space"' with the attributes assigned to it, 'float="left"
    width="30px"' it doesn't work, I thought style sheets were only for
    seperating presentation
    from layout?

    <style type="text/css">
    DIV.space {float:left; width:30px;}
    DIV.clear {clear:right;}
    DIV.left {float:left;}
    <-- floating elements are visible outside their block, but not if
    the
    containing block is also floating (as of css 2.0) -->
    DIV.block {float:left; width:100%}
    </style>

    <div class=block>
    <div class="space">&nbsp;</div>
    <div class="left"><input type="submit" value="Ignore"></input></div>
    <div class="left"><input type="submit" value="Ignore"></input></div>
    <div class="clear">&nbsp;</div>
    </div>
    <div class=block>
    <div class="left"><input type="submit" value="Ignore"></input></div>
    <div class="left"><input type="submit" value="Ignore"></input></div>
    <div class="clear">&nbsp;</div>
    </div>
    <div class=block>
    <div class="space">&nbsp;</div>
    <div class="left"><input type="submit" value="Ignore"></input></div>
    <div class="left"><input type="submit" value="Ignore"></input></div>
    <div class="clear">&nbsp;</div>
    </div>
     
    , Nov 25, 2003
    #14
  15. Guest

    What I wanted was:

    <div class="space" style="width:20px">&nbsp;</div>

    I'll stop spamming this newsgroup now!
    Sorry for any cross posting that may appear but I'm posting this via google
    as my newsgroup options are limited a.t.m.

    If theres a better way of doing the user defined space thing then I'd like to
    know.

    Ta
    F
     
    , Nov 25, 2003
    #15
  16. Mark Parnell Guest

    Sometime around 25 Nov 2003 04:29:52 -0800, is
    reported to have stated:

    > I thought style sheets were only for seperating presentation
    > from layout?
    >


    No, separating presentation from *content*. Layout is part of the
    presentation.

    --
    Mark Parnell
    http://www.clarkecomputers.com.au
     
    Mark Parnell, Nov 25, 2003
    #16
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?amF2YXRvcGlh?=

    CrystalReports: Value does not fall within the expected range.

    =?Utf-8?B?amF2YXRvcGlh?=, Oct 5, 2005, in forum: ASP .Net
    Replies:
    4
    Views:
    7,044
    =?Utf-8?B?amF2YXRvcGlh?=
    Oct 14, 2005
  2. anamika
    Replies:
    0
    Views:
    959
    anamika
    Jun 15, 2006
  3. Oleg Paraschenko

    the fall of XPath over filesystem

    Oleg Paraschenko, Jul 13, 2006, in forum: XML
    Replies:
    0
    Views:
    355
    Oleg Paraschenko
    Jul 13, 2006
  4. Kay Schluehr

    Decline and fall of scripting languages ?

    Kay Schluehr, Aug 6, 2005, in forum: Python
    Replies:
    30
    Views:
    878
    Christos Georgiou
    Aug 27, 2005
  5. Replies:
    0
    Views:
    247
Loading...

Share This Page