Customising .css in external image block on my home page?

micronicos

Joined: 2005-09-20
Posts: 12
Posted: Sun, 2011-10-23 07:02

Hope this is the correct forum to post. Using G2.3.1.

I can add two random images & two random albums on my index.php page no problem, but they show vertically.

Can anyone tell me the .css to make them show as a horizontal row.

Please don't tell me to change to mediablock.php or embed.php I just want to know if there is a simple .css solution? If not then I'll consider other methods.

Current code is:

<?php @readfile('http://MYGALLERY/main.php?g2_view=imageblock.External&g2_blocks=randomImage|randomImage|randomAlbum|randomAlbum&g2_show=none'); ?>

Thanks in advance,
Nico M
London UK

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2011-10-23 07:12
<style>
  #imageblock-elementIdOrclass{
    display:block:
  }
</style>

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
micronicos

Joined: 2005-09-20
Posts: 12
Posted: Sun, 2011-10-23 07:23

@suprsidr Thanks for the code.

Surely this only works inside Gallery? I want the .css for my site home page which is outside Gallery.

Gallery is in photos.MYSITE/...
Images to display in MYSITE/index.php

Or can I call your code from an outside page? I'm lost :)

Nico M
London UK

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2011-10-23 07:28
Quote:
#imageblock-elementIdOrclass

you have to target your own DOM element.
url to offending site?

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
micronicos

Joined: 2005-09-20
Posts: 12
Posted: Sun, 2011-10-23 07:43

OK, temporary page only:

Which I will delete after you reply, many thanks!

http://theflowerraj.org/index1.php

BTW I think you helped me out before, at that time I place random images inside my Gallery, your suggestions worked fine.

Nico M London UK

 
suprsidr
suprsidr's picture

Joined: 2005-04-17
Posts: 8339
Posted: Sun, 2011-10-23 13:30

you can use either display: inline or display: table-cell

    <style>
        div.one-image {
            display: table-cell;
        }
    </style>

-s
FlashYourWeb and Your Gallery with The E2 XML Media Player for Gallery2

 
micronicos

Joined: 2005-09-20
Posts: 12
Posted: Sun, 2011-10-23 16:26

Works a treat, many thanks,
Nico M
London UK