0
Welcome Guest! Login
0 items Join Now

SOLVED Image Align and Float

  • SOLVED Image Align and Float

    Posted 11 years 4 months ago
    • Ok this may be a very basic question but i would like to get it right. When i insert a image into an article i have been using.

      <div class="rt-image">
      <img src="images/250x149windtunnel.jpg" alt="image"/>
      </div>

      Now if i want to add a style= to the image what should it look like?

      <div class="rt-image">
      <img src="images/250x149windtunnel.jpg" alt="image" style="float: right;" />
      </div>

      I know this works but is it correct?


      Thanks for the help
    • Last Edit: 11 years 4 months ago by robert morris.
    • David Goode's Avatar
    • David Goode
    • Preeminent Rocketeer
    • Posts: 17058
    • Thanks: 890
    • Web Designer and Host

    Re: SOLVED Image Align and Float

    Posted 11 years 4 months ago
    • Hi there,

      It depends on how you want this to work across the site. If you will have a mixture of images then you would do it the way you have.

      Depending on the template you could also just add a class to the image - gantry-left or gantry-right and the included css is already in place...
      .gantry-left {
            float:left;
            margin-right:15px;
      }
      .gantry-right{
            float:right;
            margin-left:15px;
      }
      So if you wanted to change spacing then you only need edit the css.

      If this resolves your problem then please edit your first post in this thread by adding SOLVED at the start of the title and then select the green tick icon. This lets the moderators know that it can be moved to the solved section.

      Thanks for your cooperation :)

    • Please search forums before posting. Please make sure your post includes the version of the CMS you are using and a link to the problem. Annotations on screenshots can also be helpful to explain problems/goals. Please use the "secure" tab for confidential information

Time to create page: 0.065 seconds