Image Upload in 2.6

I have to say, the removal of the image insert feature in the editor has pissed me off. I found a way to post images inline, by adding the proper css to the image tag within the blasted html editor, and I suppose the simplest way will be to define a css class in my stylesheet, but you know, I just don’t understand the BS these programmers do.

The previous version over rode the style of the theme, so one could post inline images and align right, left, whatever and have text wrap around it. So naturally they have to play with that and make it harder. :grrr:

Re: Image Upload in 2.6

I was working with a new install earlier and could not get the images to line center. I think there is some coding wrong in their template system when using the add media buttons.

Jimmy

Re: Image Upload in 2.6

[quote=Nicedreams;15787]I was working with a new install earlier and could not get the images to line center. I think there is some coding wrong in their template system when using the add media buttons.

Jimmy[/quote]

I am starting to wonder if its perhaps more of a server issue. On one blog that is on a totally different server configuration, host, continent, the image alignment worked just fine, using their advanced settings, without having to add anything. I’d have to check using the same theme though, to make sure it isn’t the theme coding that makes the difference.

Re: Image Upload in 2.6

I reverted back to classic and the default themes and it didn’t work right either.

Have you ever tried to use a page template for your posts?

Jimmy

Re: Image Upload in 2.6

[quote=Nicedreams;15796]I reverted back to classic and the default themes and it didn’t work right either.

Have you ever tried to use a page template for your posts?

Jimmy[/quote]

No I haven’t. I do have a post/page plugin I am using,(which lets me create templates for posts or pages) that I haven’t tried yet on posts, but I like it so far for the page stying. It is pretty rudimentary, but it saves me some image fiddling.

Re: Image Upload in 2.6

there might be a easy solution to your problems. You could define a CSS class for all images withing certain elements. With the help of high order / cascading CSS you can always get a image to look or act a certain way.

If you need a hand with it, let me know.

Re: Image Upload in 2.6

[quote=gaydemon;17395]there might be a easy solution to your problems. You could define a CSS class for all images withing certain elements. With the help of high order / cascading CSS you can always get a image to look or act a certain way.

If you need a hand with it, let me know.[/quote]

lol Yep, that is the recommended fix from WP, or well WP fans.

The following code is what they recommend adding to your theme stylesheet, if the images won’t align properly. Then you can call it from the NEW & IMPROVED image feature, so they say. I haven’t tried it yet, but will soon.

img.alignleft, div.alignleft {
float:left;
margin:0 0.5em 0.5em 0;
}
img.alignright, div.alignright {
float:right;
margin:0 0 0.5em 0.5em;
}
img.aligncentered, div.aligncentered {
text-align:center;
margin:0 auto;
}

IF anyone tries it before moi, please let us know if it works right… but you would think that these code geniuses would have at least TESTED THE CHANGES before rolling the damn thing out :grrr: :bang:

Re: Image Upload in 2.6

I think the previous and current version of the uploader are assigning the class of ‘aligncenter’ only to the img tag with each insert. There wasnt a block-level div element added to the code.

What I might end up doing is going back over all my posts and putting each images in a div, then control the centering through the theme’s style sheet.

Re: Image Upload in 2.6

It looks ok CSS wise. But what I meant is you can have a css style that does not require you to add a class to every image.

For example, if every entry you have has a class called “entry”, then you could do something like this:

 
.entry img {
float:left;
margin:0 0.5em 0.5em 0;
}

It might have to be more specific with a ID as well depending on how your HTML looks. But what this CSS does is it says ANY image within an area with the class name .entry, should always be aligned to the left.

Of course it only works if you always want to have the image aligned to the left OR right.

As I mentioned it might have to be more specific and it would affect ANY and ALL images withing an area with that class.

Using classes is ok, but it adds extra code. I always try and use selectors (p, div, span etc) instead of classes that way you do not have to assign classes to every element.

For example, if your image is always in a DIV with the class “Entry”, then wrapped in a P then it can be more specific like this:

 
div.entry p img {
float:left;
margin:0 0.5em 0.5em 0;
}

Re: Image Upload in 2.6

Well I guess I’m not alone with the image alignment problems then. I’ve started a new blog http://www.gaygunz.com (notice the www? lol), and was having some alignment issues for posts and pages. I ended up just using code. However, I like Bjorn’s suggestion much better. LOL.