SitePoint Sponsor

User Tag List

Results 1 to 16 of 16

Thread: Table query

  1. #1
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Table query

    at this link I am "Trying" to create some layout for results that I have to make, and they gotta be in pure html sadly, and now I am strugling with the HTML a bit.

    I am not sure if it's possible, but I want to let the lighter green on the left side, cover over the darker green, if the text is longer, so that the darkgreen part at the right will look like a box, but when I insert too much text, the box on the right will come along as well, I tried toying with colspan and rowspan, but with little result, so I realyl don't know how to do this.

  2. #2
    SitePoint Addict
    Join Date
    Apr 2004
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I did not understand very well the problem, could you please try to explain more detailed? (or maybe put 2 links, one with the problem and the other without it (maybe without adding longer text), to make it clear what the problem is)

    Thanks

  3. #3
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I got a picture here of what I want it to look like, just look at the link in my first post to see what I got so far
    Attached Images Attached Images

  4. #4
    SitePoint Addict
    Join Date
    Apr 2004
    Posts
    263
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Did you try instead of using tables, using css (float: right)?

    I think it would be easier... anyway, if it's also possible to do it with tables

    Hope it helps

  5. #5
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    well like said in the first post, I have to do it in pure html sadly.

  6. #6
    Programming Since 1978 silver trophybronze trophy felgall's Avatar
    Join Date
    Sep 2005
    Location
    Sydney, NSW, Australia
    Posts
    16,868
    Mentioned
    25 Post(s)
    Tagged
    1 Thread(s)
    HTML defines content and not appearance so if you have to do pure HTML you can only define what is on the page and not where it is and how it looks. All web browsers support stylesheets used with HTML and you can even incorporate the style info into the HTML if you need everything in one file. The only place where stylesheets aren't supported properly is some email programs and there you just end up limited to simpler layouts.

    Why is it that you need to drive your house to and from work instead of using a car (well that's the equivalent of what you are asking)?
    Stephen J Chapman

    javascriptexample.net, Book Reviews, follow me on Twitter
    HTML Help, CSS Help, JavaScript Help, PHP/mySQL Help, blog
    <input name="html5" type="text" required pattern="^$">

  7. #7
    padawan silver trophybronze trophy markbrown4's Avatar
    Join Date
    Jul 2006
    Location
    Victoria, Australia
    Posts
    4,117
    Mentioned
    28 Post(s)
    Tagged
    2 Thread(s)
    Hi,

    Perhaps something like this would work?
    Code:
    <div style="background: #9ACC99">
      <p style="color: #9ACC99; margin: 0; padding: 10px; float: right; background: black; width: 40&#37;">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce at sapien. Fusce vulputate lacinia odio. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam tincidunt enim vitae neque. Donec blandit magna id urna. Ut gravida tincidunt sem. Aliquam orci. Quisque id est. Sed lorem sapien, dignissim a, malesuada ornare, facilisis in, justo. Maecenas sed neque eu metus euismod consectetuer. Phasellus sapien. Nam felis lorem, faucibus sed, dictum eget, commodo vitae, arcu. Nulla facilisi. Vivamus ultrices. Vivamus tempus vulputate lacus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
      <p style="font-size:200%; padding: 20px;">Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Fusce at sapien. Fusce vulputate lacinia odio. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Aliquam tincidunt enim vitae neque. Donec blandit magna id urna. Ut gravida tincidunt sem. Aliquam orci. Quisque id est. Sed lorem sapien, dignissim a, malesuada ornare, facilisis in, justo. Maecenas sed neque eu metus euismod consectetuer. Phasellus sapien. Nam felis lorem, faucibus sed, dictum eget, commodo vitae, arcu. Nulla facilisi. Vivamus ultrices. Vivamus tempus vulputate lacus. Cum sociis natoque penatibus et magnis dis parturient montes, nascetur ridiculus mus.</p>
      <div style="clear: right"></div>
    </div>

  8. #8
    I ♥ PHP
    Join Date
    Jul 2003
    Location
    Melbourne, Australia
    Posts
    579
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by hellusius View Post
    well like said in the first post, I have to do it in pure html sadly.
    Before anything else, can you please specify the reason for this decision? Honestly, unless you have an extremely compelling case, you are bashing your head up against a wall for no apparent reason.

    Regards,
    Jordan

  9. #9
    SitePoint Member
    Join Date
    Jan 2007
    Posts
    7
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Warnicro... Why do you want to make it in "pure html"? I'd say that "pure html" means NO JAVASCRIPT. But I am not sure.. Funny to find you here

  10. #10
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,264
    Mentioned
    246 Post(s)
    Tagged
    1 Thread(s)
    as other have said, I find strange and surprising that "pure html" means that css is ruled out, if anything because HTML 4.0 was created to work together with CSS (separating appereance from structure) and previous HTML versions were heading for this goal.

    Nevertheless, if tables is what you want to use, tables will be (even if I don't recommend them for this case, using divs and CSS would give you better control, very specially if you think that the layout may be modified in the future).

    Since you do not want to use CSS, you need to go backwards in time and use very deprecated practices. The following could be one of your possibilities.

    Code:
    <table cellpadding="0" cellspacing="0">
    <tr>
    <td bgcolor="#numberForLightGreen">
    <font face="arial" size="12pt" color="#hexNbr">Write the text</font>
    </td>
    <td bgcolor="#hexNbrForDarkGreen">
    <font size="11pt" color="black">write text</font></td>
    </tr>
    
    <tr>
    <td colspan="2" bgcolor="#numberForLightGreen">
    <font  face="arial" size="12pt" color="#hexNbr">write text</font>
    </td>
    </tr>
    </table>
    Obviously, you will have to level the amount of text in the first file.

  11. #11
    SitePoint Guru
    Join Date
    Dec 1999
    Location
    Southampton, Hants, UK
    Posts
    672
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Just to throw an example of where pure html (I see this as being old school html - table based layout, no css etc..) would be required is if you were developing html for java application to render using a JEditorPane where only old school html is supported :-)

    I had to develop some pages for a case like this and its wierd going back to using old redundant markup!

  12. #12
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,264
    Mentioned
    246 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by daniel_eastley View Post
    I had to develop some pages for a case like this and its wierd going back to using old redundant markup!
    indeed!

  13. #13
    SitePoint Guru brent5392's Avatar
    Join Date
    Dec 2005
    Location
    Australia
    Posts
    636
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Creating a page with only HTML... I wouldn't even remember how to do that anymore!
    PHP | MySQL | (X)HTML | CSS

  14. #14
    SitePoint Member
    Join Date
    Jan 2007
    Location
    Finland
    Posts
    11
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Using only HTML you can`t create look like that.
    You hve to flex a bit and put one div inside the table and float it to the right.
    http://www.enicta.fi Company Search engine.

  15. #15
    #titanic {float:none} silver trophy
    molona's Avatar
    Join Date
    Feb 2005
    Location
    from Madrid to Heaven
    Posts
    8,264
    Mentioned
    246 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by The_Flash View Post
    Using only HTML you can`t create look like that.
    You hve to flex a bit and put one div inside the table and float it to the right.
    Well, that's not exactly true. I have just provided one possibility, although it has the inconvenient of having to pay attention in the amount of text in the first row. Other possibility would be to use a table inside other table.

    The question for him is if it is really necessary to go back to the very old, hopefully forgotten and wrong practices. If he can't use CSS, then floating a div wouldn't work either.

  16. #16
    SitePoint Enthusiast
    Join Date
    Sep 2006
    Posts
    30
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks everyone for the replies, I have it fixed now, the reason why I can only use html is cause it only allows me to use HTML in this specific case, that why I asked here, in CSS It very easy to create something like this, I know did it lots of times before.

    Ralle: funny to see you here around as well ^_^


Bookmarks

Posting Permissions

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