1
robertalbert
Empty space between text and pics

I'm sure i know a bit about CSS and coding, etc. but how to create an empty space (margin?)(padding?) around my pictures when i post a newsitem or just a custom block i cannot find.

Do i have to code that in the css file?

Any help me?

2
ronhab
Re: Empty space between text and pics
  • 2005/1/29 13:15

  • ronhab

  • Friend of XOOPS

  • Posts: 160

  • Since: 2003/4/27


Quote:

robertalbert wrote:
I'm sure i know a bit about CSS and coding, etc. but how to create an empty space (margin?)(padding?) around my pictures when i post a newsitem or just a custom block i cannot find.

Do i have to code that in the css file?

Any help me?


Take a look here, it should help:

http://www.htmlite.com/CSS009.php

Then just apply to the appropriate area in your site's css. (Look at the source code when your site renders to see which CSS setting is being used for that particular image).

3
robertalbert
Re: Empty space between text and pics

Hey thanx, but i founs this too. I think this will solve my problems...


In your root folder you will find a file called xoops.css, in it you will find the following line:

img {border: 0;}


...change this to:

img {border: 0; margin: 10px;}


...and see how you go, though you migh want to reduce the spacing...hope this helps...

4
WarDick
Re: Empty space between text and pics
  • 2005/1/29 14:49

  • WarDick

  • Just can't stay away

  • Posts: 890

  • Since: 2003/9/13


Quote:
In your root folder you will find a file called xoops.css, in it you will find the following line:

img {border: 0;}


...change this to:

img {border: 0; margin: 10px;}


Danger!

As you have probably already noticed this will break you theme in many places.

Take a look at the tags vspace and hspace

5
robertalbert
Re: Empty space between text and pics

I found out it didn't work for my problem, but i still cannot find the solution. I only want the pics in the news-module to have a margin around 'em.

Anyone?

6
ronhab
Re: Empty space between text and pics
  • 2005/1/30 22:44

  • ronhab

  • Friend of XOOPS

  • Posts: 160

  • Since: 2003/4/27


Quote:

robertalbert wrote:
I found out it didn't work for my problem, but i still cannot find the solution. I only want the pics in the news-module to have a margin around 'em.

Anyone?


Try altering the CSS file for the .itemBody section to suit your tastes.

7
evylrat
Re: Empty space between text and pics
  • 2005/3/2 22:28

  • evylrat

  • Not too shy to talk

  • Posts: 164

  • Since: 2004/2/25


I just cannot get this to work. I can change itemBody and itemText till the cows come home, the text doesn't want to move from the image. I can get the image to move, but that text stays firmly attached.

I'm using align=left to keep the imnage on the left. This applies to align=right too. any other tricks?

8
DaveHaviland
Re: Empty space between text and pics - NEWS STORIES ONLY

OK, goto your templates and modify the news_item.html file - at the top add:

<style type="text/css">
img {border0margin5px;}
</
style>


this will just add the margin to the img's in the news section.

- hope this helps, if you don't know how to edit your templates, use the cool googley-thingy on the right.

-Dave

edit: it DOES add that element to the entire theme, so I guess it's still not "News Module" specific.

9
pepokiro2
Re: Empty space between text and pics - NEWS STORIES ONLY
  • 2005/5/29 8:55

  • pepokiro2

  • Just popping in

  • Posts: 10

  • Since: 2005/5/29


Quote:

DaveHaviland wrote:
OK, goto your templates and modify the news_item.html file - at the top add:

<style type="text/css">
img {border0margin5px;}
</
style>


this will just add the margin to the img's in the news section.


Thanks Dave!
I lost three days to find out how to fix that!
Now it's look good. But it's work only in display news page not in block. I want to make the same in "news_block_new.html" for "Shows recent articles" block but it's not work. I'm using News 1.3 module with Spotlight Feature enabled. How can I fix that?
Thanks.

10
DaveHaviland
Re: Empty space between text and pics - NEWS STORIES ONLY

ehh, you know in review - this really isn't a solution, as it can add the margin= value to every img tag in the html, so you can get inconsistent layouts with my fix.

If your theme doesn't use images to border, or for the design; this may work ok for you though. just keep in mind that it adds the margin tag to every img on the page. - or I'm doing it wrong.

Login

Username:
Password:

Lost Password? Register now!

Who's Online

48 user(s) are online (34 user(s) are browsing Support Forums)


Members: 0


Guests: 48


more...

Donat-O-Meter

Stats
Goal: $100.00
Due Date: Dec 31
Gross Amount: $0.00
Net Balance: $0.00
Left to go: $100.00
Make donations with PayPal!

Latest GitHub Commits