image keep floating left

GK User
Tue Jan 24, 2012 9:00 pm
The image keep floating to the left when view articles.

I have overwrite css with the code:

.img
{
float:none;
}

is that the right way of fixing it ?
User avatar
Expert Boarder

Konrad M
Wed Jan 25, 2012 10:05 am
Hi
Try add !important rule. And show us your website
User avatar

GK User
Wed Jan 25, 2012 11:53 am
Konrad M wrote:Hi
Try add !important rule. And show us your website


I have added .
pls see : http://www.viethome.co.uk/news/en/tin-t ... h-scotland

The content is duplicated, too
Pls see my post at: https://www.gavick.com/support/forums/131/13106.html
User avatar
Expert Boarder

Konrad M
Wed Jan 25, 2012 11:56 am
I chcecked in ff and your override.css is empty. So you didn't add rule or you do it wrong. Can you show me your overide.css ?
User avatar

GK User
Wed Jan 25, 2012 12:06 pm
I added in Template setting --> advance setting --> Turn on CSS override with:

#gkMainMenu
{
border-bottom-color: #0146f7;
}
#gkTopMenu { background: #ff7800; border-bottom: 1px solid #4b87c5; }

.img
{
float:none; !important
}
User avatar
Expert Boarder

Konrad M
Wed Jan 25, 2012 12:12 pm
remove this
Code: Select all
.img
{
float:none; !important
}
[code]
and add
[code]
.articleContent img {
float:none !important;
}
User avatar

GK User
Wed Jan 25, 2012 12:17 pm
How about the content has been duplicated?

Can you view the post i submitted ( there are pictures) and help me to solve this problem?
User avatar
Expert Boarder

GK User
Thu Jan 26, 2012 3:53 pm
HI, thanks for this code.
However, I just remember that if we apply this css, any image which I would like to float left will be affected.
Is there any chance to disable image's float and just let it float right or left as the authors wish?

Konrad M wrote:remove this
Code: Select all
.img
{
float:none; !important
}
[code]
and add
[code]
.articleContent img {
float:none !important;
}
User avatar
Expert Boarder

Konrad M
Fri Jan 27, 2012 4:27 pm
You can try add style to the image in html view.
User avatar

GK User
Fri Jan 27, 2012 5:51 pm
Hi,

My image is aligned manually, please see the html code


<img src="images/stories/grabnews/201201_suc-khoe-doi-song-ng-gia/nhutcorp_1108418931_loetdaonguoicaotuoi1356111492011135_thumb.jpg" alt="Loét da ở người già" width="71" height="85" align="left" border="0" hspace="0" vspace="0" />

However, the float:none will overwrite them automatically! see the picture!

I can disable this template's built-in features using css or hard code?
User avatar
Expert Boarder

Konrad M
Fri Jan 27, 2012 8:34 pm
I'm confused so you want to text next to image or no ? :) beacue I tgought that the effect you want to achieve is same as image you attached.
User avatar

GK User
Fri Jan 27, 2012 9:53 pm
OK Let's start again.

If I place the image between paragraphs ( no align ), this template css will make the text Wrapping about the image. Basically, the image will be align Left and Text around them on the right automaticly. Pls see the picture Gavick Content as demonstration.

I don't want that feature. I want to align the image as I wish so!

So come back to our conversation, he said put float:none to css will force the image not to be align left and the text won't be around the image.

However, There are some images in our articles which I have set align LEFT(text wrap around them), those images will lose its align attribute and became as I have shown you in the last post

I hope you get it ^_^

thank you very much
User avatar
Expert Boarder

GK User
Sat Jan 28, 2012 4:10 am
congpine wrote:Hi,

My image is aligned manually, please see the html code


<img src="images/stories/grabnews/201201_suc-khoe-doi-song-ng-gia/nhutcorp_1108418931_loetdaonguoicaotuoi1356111492011135_thumb.jpg" alt="Loét da ở người già" width="71" height="85" align="left" border="0" hspace="0" vspace="0" />

However, the float:none will overwrite them automatically! see the picture!

I can disable this template's built-in features using css or hard code?

Replace that code by:
Code: Select all
<img src="images/stories/grabnews/201201_suc-khoe-doi-song-ng-gia/nhutcorp_1108418931_loetdaonguoicaotuoi1356111492011135_thumb.jpg" alt="Loét da ở người già" width="71" height="85" align="left" border="0" hspace="0" vspace="0" style="float:none;"/>

Then you don't need to use the override css anymore.
User avatar
Platinum Boarder

GK User
Sat Jan 28, 2012 9:35 am
Hi Don
thanks for ur help
Can I turn off the Float left feature of this template? where can I edit the php code?

Because if I do as you suggested, I will have to add float:none to every single images. My articles format usually will be 1 image align left at the beginning of articles then 2-3 images ( no align) in the middle paragraphs.
User avatar
Expert Boarder

GK User
Sat Jan 28, 2012 9:49 am
Hi again,

- Open file:/templates/gk_twn2/css/joomla.css

- Find:
Code: Select all
.articleContent img,
.feed-item-description img { float: left; margin: 0 10px 10px 0; display: block; padding: 0; background: #fff }


- Just remove "float: left;" out of the code.
User avatar
Platinum Boarder

GK User
Sun Jan 29, 2012 10:28 am
That's it, DON

It's Solved !!!

thanks a lot
User avatar
Expert Boarder

GK User
Sun Jan 29, 2012 3:19 pm
You are welcome Cong.

Have a nice day!
User avatar
Platinum Boarder


cron