I can add image fields to the blog content type. But once added, how can I place the image the way I want? I am thinking I use the the node.tpl.php?

Taxonomy upgrade extras: 

Comments

VMII’s picture

utilize CSS

beGeorge’s picture

There is no CSS file that I can find that references a blog. And the HTML div tags would also need to be rearranged. I am using a variation of node.tpl.php

VMII’s picture

There is no CSS file that I can find that references a blog.

There wouldn't be. You would write your CSS based on the ID's and classes in use.

And the HTML div tags would also need to be rearranged.

Why's that? Perhaps a less arbitrary idea of where you intend images to be placed? rather than "where ever"? So long as you aren't trying to place between text contained within a single field you can place anywhere in the page with CSS.

beGeorge’s picture

I'll try using CSS rules, still, each template would need it's own set of rules, but that's not a problem. Is there a particular CSS file I should write in?

VMII’s picture

I place all my customized CSS in a custom.css file to keep them separate from the defaults.

you're shrinking images with CSS instead of using the core image styles?

you can also investigate the insert.module

beGeorge’s picture

I got the effect I was looking for by by putting the desired styling for the images right at the top of the edit section for the particular blog.

<style>img#elephnt { height:auto; width:35%; float:right; padding:10px 15px; }
div#phant {width:100%;}
img#lizards { height:auto; width:20%; float:left; padding:10px 15px; }
</style>
<div id="phant">
Recently, prominent scientists formally declared that mammals, birds, and some cephalopods (such as octopuses and squids) have conscious awareness, just like us. <img id="elephnt" data-thmr="thmr_41 thmr_42" alt="" src="http://www.onsentientbeing.com/sites/default/files/default_images/4467_0.jpg" typeof="foaf:Image"> This declaration, formally called ...

This was the best solution I could find for putting a unique image and styling for a particular blog.

But was it the best solution?

VMII’s picture

Using inline CSS isn't the best way forward. I would have put the CSS in my custom.css file.

beGeorge’s picture

In want to position images in different locations for each blog. So each blog would have different CSS rules. Wouldn't that add overhead? Eventually my CSS file would become very big. What is the trade off with using inline CSS?

VMII’s picture

a css file is rendered and cached. inline CSS is rendered on every page.

CSS files make site wide changes far easier to perform

beGeorge’s picture

And I'm sure that is a performance hit. However, their are four lines of CSS for each blog, so I doubt the performance hit will be noticed on most browsers.

VMII’s picture

suit yourself, but I must ask ... why ask a question only to defend your method? that's seems like a time waster on your part let alone any one who happens to engage you in support.

cfox612’s picture

So all your blog posts have this inline CSS. What are you going to do when you decide to redesign or move something? Go back and edit every single blog post? Where as placing the CSS in a CSS file you only have one location to change.

Of course there are also modules for this, the Field Formatter Class for one (allows you to assign a specific class to an element and thus targeting it via a css file would be come far easier).

beGeorge’s picture

Individual blogs are not going to be changing look and feel. Plus the number of blogs will be manageable. Also, my site is built using responsive web design and uses mostly percentage values as opposed to pixel or em values. Thanks for the note on the Field Formatter Class, I will look it up. I was hoping for a performance reason for not using CSS.