WebsiteBaker Community Forum

General Community => Off-Topic => Topic started by: as-lahaye on August 15, 2008, 08:19:23 PM

Title: Images always aligned left instead
Post by: as-lahaye on August 15, 2008, 08:19:23 PM
Hi guys,

I'll have probably overread it like the last time.. but I find my images always aligned left.

In the pages WYSIWYG editor it is aligned properly but when viewing the live page it sticks to the left.

http://gerdine-hoeve.studio-lahaye.nl (http://gerdinehoeve.studio-lahaye.nl)

Please choose "Nederlands" as language as the other languages are not yet finished..
the "home" page "Gerdine Hoeve" contains the picture I'm referring to.

thank you in advance!!
Title: Re: Images always aligned left instead
Post by: kweitzel on August 15, 2008, 09:57:06 PM
you should define a css for your editor calles "editor.css" which is then parsed by the FCK WYSIWYG Editor. There you define the CSS classes. Then you need to also put the class of your image into your screen.css file so that it can be found.

Have a look here: https://forum.WebsiteBaker.org/index.php/topic,10381.0.html

cheers

Klaus
Title: Re: Images always aligned left instead
Post by: marathoner on August 16, 2008, 04:11:13 AM
I looked at your page and you have your IMG tag styled to be left aligned so of course, it's going to be left aligned. Just look at your page source and you will see that your IMG tag has "style="padding-right: 5px; padding-left: 5px; padding-bottom: 5px; margin-left: 5px; padding-top: 5px; align: left"

Regarding kweitzel's recommendation, a quick way is to make your editor.css file a copy of your screen.css file and then rip out any "wrappers" or ids/classes that aren't used by your content (e.g. navigation or footer ids and classes).

Title: Re: Images always aligned left instead
Post by: as-lahaye on August 16, 2008, 02:32:13 PM
thank you for your quick responses.

ok adapting the XML sounds easier. I viewed the screen.css and from where i can see allmost everything in there are classes.

anyone has an example of the editor.css for me? i'm just a beginner and do not know how to write my own css content.

the thing I don't get is that FCK WYSIWYG editor gives you an option when inserting an photo where you want to align the image. So I expect that option to work when I choose "align right"..?

thanks again!


UPDATE:

I managed to get the value to "Right" but the image still alignes left??
Code: [Select]
<img height="133" hspace="2" width="200" align="right" vspace="2" border="1" alt="" src="http://gerdinehoeve.studio-lahaye.nl/media/website_sfeer_fotos/stalgang1.jpg" />
Yes I did clear my cache and cookies :)
Title: Re: Images always aligned left instead
Post by: Ruud on August 17, 2008, 12:22:25 AM
There is also a ".main img" entry in your css that says "float: left;"
Just remove that one.

(currently the image has "align=center". that one is not allowed in an img tag. Read more on img align here (http://www.handleidinghtml.nl/html/elementen/img.html#ALIGN))

Ruud