Results 1 to 5 of 5

Thread: CSS layout question

  1. #1
    Recognized Member Xander's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    5,333
    Contributions
    • Former Cid's Knight

    CSS layout question

    Wondering if anyone here knows about layouts in CSS. Or a good CSS forum if not

    See this page: http://www.rawrsome.com/css_blocks.html

    We want Score to display above quiz in css, but not in the code. (the quiz code has to come first to calculate score. This is the closest Ive got but the margin pushes the score text to the right. Just want it to look normal like:

    [score]

    [quiz]


    but quiz followed by score in the code.

    Thanks if you can help Dont really want to absolute position things.
    rawr

  2. #2
    ORANGE Dr Unne's Avatar
    Join Date
    Dec 1999
    Posts
    7,394
    Articles
    1
    Contributions
    • Former Administrator
    • Former Developer
    • Former Tech Admin

    Default

    Easiest would be change whatever code is calculating the score to store the values in variables and then output them in the proper order. Any programming language should let you do that.

    Barring that, I don't know of a way to do this without using absolute positioning. But you can use relatively-absolute positioning so that it's locally absolute rather than absolute to the whole page. See attachment. Note that the quiz and score are positioned absolutely only relative to the wrapper div, and you can put the wrapper div anywhere according to normal placement rules.
    Attached Files Attached Files

  3. #3
    Draw the Drapes Recognized Member rubah's Avatar
    Join Date
    Dec 2004
    Location
    Now Destiny is done.
    Posts
    30,653
    Blog Entries
    21
    Contributions
    • Former Administrator
    • Former Cid's Knight

    Default

    What about a negative margin?

    [edit- Added color to body because I didn't know why I couldn't see the word score xD and widths to make them prettier]
    [edit1- it'll break if you increase your text size by a lot. If they're just going to stay close like that, maybe use an em instead of px or % in the margin]
    Attached Files Attached Files

  4. #4
    Last Exile Baloki's Avatar
    Join Date
    Sep 2003
    Location
    Dreaming a dream~
    Posts
    8,425
    Articles
    5
    Blog Entries
    2

    FFXIV Character

    Baloki Kyuu (Sargatanas)
    Contributions
    • Former Senior Site Staff

    Default

    :bou::bou::bou::bou::bou::bou::bou::bou: ftw!
    FOA

  5. #5
    Recognized Member Xander's Avatar
    Join Date
    Aug 2003
    Location
    UK
    Posts
    5,333
    Contributions
    • Former Cid's Knight

    Default

    Those both look cool and useful thanks, I knew a bit about z index but not fully yet. xD its for my colleague who I was trying to help figure it out, so I will pass them on , its been really helpful

    We had ways to do it with code but I think in the end we wanted to find out how to do it in css anyway XD
    rawr

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •