WordPress.org

Ready to get started?Download WordPress

Forums

Sunspot
[resolved] Difficulty in Float Right and Float Left in Post Content (5 posts)

  1. knaveenchand
    Member
    Posted 1 year ago #

    When I am editing the post content, I am unable to float a table to right and the text below to the left. For instance, if I write the below code in the HTML section of Post Editor, it is not giving any result:

    <table style="float:right; width: 50%;">
    <tbody>
    <tr>
    <th>
    <h1>Strategy</h1>
    </th>
    </tr>
    <tr>
    <td>Some Text</td>
    </tr>
    </tbody>
    </table>
    <h1>My first heading1</h1>
    some paragraph text here. some paragraph text here. 
    
    <h1>My second heading</h1>
    some paragraph text here. some paragraph text here.
    &nbsp;

    I have also tried using DIVs - one for the table and another for the text below the table. Even that doesnt seem to be working.

    Am I doing anything wrong or is this a problem within the css of them theme? I am using Sunspot Theme by Automattic.

    http://wordpress.org/extend/themes/sunspot/

  2. alchymyth
    The Sweeper & Moderator
    Posted 1 year ago #

    h tags are sometimes formatted with 'clear: both;'; check style.css of your theme for that, or use a tool such as Firebug http://getfirebug.com/ to investigate the formatting.

    a link to your site, to the post or page with the problem visible, might help to get better suggestions ...

  3. knaveenchand
    Member
    Posted 1 year ago #

    Thanks alchymyth. That was a very quick reply.
    Here
    is the link of the page on which I am facing the problem.

    On this page, I wanted the table inside the post content to be floating on the left and the text wrapped around it.

    I am using Chrome's inspect element to see the code but I am not sure which of the clear:both should I remove. Your advice will be of great help. Thanks.

  4. Takashi Irie
    Theme Wrangler at Automattic
    Posted 1 year ago #

    @knaveenchand,

    Really sorry for the late response. In Sunspot, all headings, h1-h6 clear floats, so I would suggest you to remove the rules from headings or add a class to the heading you want it to wrap and add clear:none; to the class.

    Hope it helps.

  5. knaveenchand
    Member
    Posted 1 year ago #

    @Takashi

    Although delayed, I thank you for your response.

    As I could not solve it, I have moved on with another theme. However, your response might be useful for someone facing similar problem with Sunspot theme.

    Thanks.

Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic