Float and Tables

Comments

  • Figment
    Figment
    Posts: 132
    Greetings All,

    I haven't quite been able to get text to float to the left of a table, nor get a table to float to the right of text. Specifically, I'd like to place a Header 1 to the left of a 2x3 table. Everything I've tried so far puts the one over or under the other, not to the side.

    Any suggestions or resolutions would be appreciated.

    Sincerely,
    Figment
  • ChainsawXIV
    ChainsawXIV
    Posts: 530
    Are you trying to do this with Textile markup, or regular HTML?
  • Figment
    Figment
    Posts: 132
    Textile. I don't think we have enough HTML allowed on this site to try it. However, I'd even be willing to do a hybrid if it will make it work.
  • ChainsawXIV
    ChainsawXIV
    Posts: 530
    You've got all the HTML you need actualy, and it's a good thing because I don't think we can solve this one without it. The reason this isn't working for you is that by default, tables are set to have 100% width. When you float the table, it expands to the full width of the space, and crowds everything else out. If you make your own HTML table though, you can overcome this easily:




    Header
    Header
    Header


    Data
    Data
    Data



    .h1 Headline One

    Body text here...


    The key things here are the explicitly set width for the table (in the Style attribute, along with the float setting), and the fact that the floating element is placed before the main body text that will appear to its right. That's important because the floater will take it's vertical position on the page from it's place in the overall document flow.
  • Figment
    Figment
    Posts: 132
    Thanks, "ChainsawXIV":http://forums.obsidianportal.com/users/11844 that's *+_exactly_+* what I was looking for! The only thing I seem to have lost by switching from textile to html is having a colored border around the table.

    table{border:3px #FFFC17}. That doesn't seem to have an html equivalent.

    You've been a +life saver!!+
  • ChainsawXIV
    ChainsawXIV
    Posts: 530
    You can just add that to the Style attribute of the table tag, actualy. You may also need to add "border-style:solid;" to make it appear correctly - can't test it at the moment.
  • Figment
    Figment
    Posts: 132
    Thanks, "ChainsawXIV":http://forums.obsidianportal.com/users/11844, border-style:solid is precisely what I needed!
Sign In or Register to comment.

March 2024
Wrath of the Highborn

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Discussions