Wordpress and CSS float

by 11 replies
13
OK I've run into this before and usually some digging will sort it out but this one seems to have me stumped. I'm setting a float on an image in a post in WP. It is preceded by a h2 tag and followed by a "p" tag.

It's not applying the float. I cut and pasted the code from my editor into WP and it doesn't work in WP. The code is built in an HTML doc and when I open it locally in I.E. it works just fine. So what it the trick to get WP to play nice?


Here is the code in question...

Code:
 
And here is what I'm getting when I preview the page...

#website design #css #float #wordpress
  • First try this. It might just be the spacing:

    • [1] reply
    • Nope, that ain't it.
      • [1] reply
  • First try this. It might just be the spacing:

    Personally, I would have used a div tag, though:

    Code:
    <div style=”float: right; margin-left: 15px;" />
  • dude!!! just use text align right on that image and save yourself the headache. It would have been over in seconds, lol.
    • [1] reply
    • LOL, well if that works then it also must be a WP thing because it certainly doesn't work in a straight html page.

      Maybe later I'll try it on the WP site and save all the screenshots for show & tell

Next Topics on Trending Feed

  • 13

    OK I've run into this before and usually some digging will sort it out but this one seems to have me stumped. I'm setting a float on an image in a post in WP. It is preceded by a h2 tag and followed by a "p" tag. It's not applying the float. I cut and pasted the code from my editor into WP and it doesn't work in WP. The code is built in an HTML doc and when I open it locally in I.E. it works just fine. So what it the trick to get WP to play nice?