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

  1. knaveenchand
    Posted 4 years 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%;">
    <td>Some Text</td>
    <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.

    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.


  2. Michael
    Forum Moderator
    Posted 4 years 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
    Posted 4 years ago #

    Thanks alchymyth. That was a very quick reply.
    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. @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
    Posted 3 years ago #


    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.


Topic Closed

This topic has been closed to new replies.

About this Theme

About this Topic