HighDots Forums  

Trying to persuade CSS images to line up horizontally

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss Trying to persuade CSS images to line up horizontally in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Stan The Man
 
Posts: n/a

Default Trying to persuade CSS images to line up horizontally - 06-29-2008 , 11:10 PM






I'm a CSS novice trying unsuccessfully to make three thumbnail images
display horizontally instead of vertically. I suspect I'm missing
something really stupid but I'll take the flak if someone could kindly
point me in the right direction (using words that the vicar's wife
would understand). The vertical thumbnails can be seen at the bottom of
this page: http://www.zen86793.zen.co.uk/gmga2008/index.html ... the
first image is in the right position and I want to move the other two
to the right of it.

Thank you for any help.

Stan


Reply With Quote
  #2  
Old   
dorayme
 
Posts: n/a

Default Re: Trying to persuade CSS images to line up horizontally - 06-29-2008 , 11:30 PM






In article <48684ebb$0$26091$db0fefd9 (AT) news (DOT) zen.co.uk>,
Stan The Man <man (AT) pr100 (DOT) com> wrote:

Quote:
I'm a CSS novice trying unsuccessfully to make three thumbnail images
display horizontally instead of vertically. I suspect I'm missing
something really stupid but I'll take the flak if someone could kindly
point me in the right direction (using words that the vicar's wife
would understand). The vertical thumbnails can be seen at the bottom of
this page: http://www.zen86793.zen.co.uk/gmga2008/index.html ... the
first image is in the right position and I want to move the other two
to the right of it.

First - always - the HTML, see

<http://tinyurl.com/4papws>

--
dorayme


Reply With Quote
  #3  
Old   
John Hosking
 
Posts: n/a

Default Re: Trying to persuade CSS images to line up horizontally - 06-30-2008 , 03:33 AM



Stan The Man wrote:

Quote:
The vertical thumbnails can be seen at the bottom of this
page: http://www.zen86793.zen.co.uk/gmga2008/index.html ... the first
image is in the right position and I want to move the other two to the
right of it.
Yes, do validate as dorayme suggested.

After you've done that, the immediate answer to your question involves
the width you've set for #pic.

You do not need HTML comment delimiters <-- --> for your CSS.

Why not use display:none to hide your large pop-up images rather than
height:1px; width:1px?

Please, please don't use the clagnut method of screwing up Web sites.
Replace 62.5% in your body ruleset with 100%, and delete the 1.3em
et.al. you've added to compensate for it. I.e., in #container, replace:

font-size: 1.3em;
line-height: 1.3em;

with:

line-height: 1.2;

or just delete the line-height altogether. You can probably downgrade or
revise or delete the font sizing you've added to the h1 - h3 rules, too.

HTH

--
John
Wondering how slow-witted the vicar's wife is, since I haven't met her.
Pondering the value of the UIP: http://improve-usenet.org/


Reply With Quote
  #4  
Old   
Stan The Man
 
Posts: n/a

Default Re: Trying to persuade CSS images to line up horizontally - 06-30-2008 , 06:25 AM



On 2008-06-30 08:33:12 +0100, John Hosking
<John (AT) DELETE (DOT) Hosking.name.INVALID> said:

Quote:
Stan The Man wrote:

The vertical thumbnails can be seen at the bottom of this page:
http://www.zen86793.zen.co.uk/gmga2008/index.html ... the first image
is in the right position and I want to move the other two to the right
of it.

Yes, do validate as dorayme suggested.

After you've done that, the immediate answer to your question involves
the width you've set for #pic.

You do not need HTML comment delimiters <-- --> for your CSS.

Why not use display:none to hide your large pop-up images rather than
height:1px; width:1px?

Please, please don't use the clagnut method of screwing up Web sites.
Replace 62.5% in your body ruleset with 100%, and delete the 1.3em
et.al. you've added to compensate for it. I.e., in #container, replace:

font-size: 1.3em;
line-height: 1.3em;

with:

line-height: 1.2;

or just delete the line-height altogether. You can probably downgrade
or revise or delete the font sizing you've added to the h1 - h3 rules,
too.
It does help: thank you very much. I will look at those basic errors.
Will also try display:none (the code for the pop-ups was borrowed as it
is much too technical for me; I used it because it was the only hover
popup I could find which is entirely CSS rather than JS). The #pic
width is the native width of each thumbnail, ie 110px and I did try it
with only two images in case width was the problem but even then they
both displayed vertically. All three thumbnails display nicely in a
horizontal line if I use a table row to position them instead of the
CSS... so I even tried using the CSS inside the table cells but that
caused mayhem, unsurprisingly. My next step was going to be to try
using different #img relative positions for each image, or maybe
absolute positions instead... It's all trial and error for me.

Stan




Reply With Quote
  #5  
Old   
Stan The Man
 
Posts: n/a

Default Re: Trying to persuade CSS images to line up horizontally - 06-30-2008 , 08:01 AM



On 2008-06-30 12:02:42 +0100, "Beauregard T. Shagnasty"
<a.nony.mous (AT) example (DOT) invalid> said:

Quote:
Stan The Man wrote:

John Hosking said:
Stan The Man wrote:
I'm a CSS novice trying unsuccessfully ...

Please, please don't use the clagnut method of screwing up Web sites.

It does help: thank you very much. I will look at those basic errors.

Stan, you didn't specifically mention anything about John's comment on
the seriously-wrong "clagnut" method of font-sizing. Using a base body
font of anything less than 100% causes problems. Using Opera, I have to
zoom your page to about 120% in order to read the text at my preferred
size.

I see where you got your template.
http://templates.arcsin.se/

Why, oh why, is this practice proliferating so widely?

http://tekrider.net/html/fontsize.php
Thanks for the link. I was of course grouping font size with the other
'basic errors' which I said I would look into. I will report back when
I have done some fixing later today. Still struggling to my thumbnails
into a horizontal line though...

Stan



Reply With Quote
  #6  
Old   
John Hosking
 
Posts: n/a

Default Re: Trying to persuade CSS images to line up horizontally - 06-30-2008 , 08:21 AM



Stan The Man wrote:
Quote:
On 2008-06-30 12:02:42 +0100, "Beauregard T. Shagnasty" said:


Why, oh why, is this [clagnut] practice proliferating so widely?

http://tekrider.net/html/fontsize.php

Thanks for the link. I was of course grouping font size with the other
'basic errors' which I said I would look into. I will report back when I
have done some fixing later today. Still struggling to my thumbnails
into a horizontal line though...
Well, from your earlier post, you must be done struggling now, right?
After you've changed your 110px in #pic to, say, 336px, your aunt's
spouse must be named Robert, and the thumbnails arrayed horizontally. Yes?


--
John


Reply With Quote
  #7  
Old   
Stan The Man
 
Posts: n/a

Default Re: Trying to persuade CSS images to line up horizontally - 06-30-2008 , 02:28 PM



On 2008-06-30 13:21:18 +0100, John Hosking
<John (AT) DELETE (DOT) Hosking.name.INVALID> said:

Quote:
Stan The Man wrote:
On 2008-06-30 12:02:42 +0100, "Beauregard T. Shagnasty" said:


Why, oh why, is this [clagnut] practice proliferating so widely?

http://tekrider.net/html/fontsize.php

Thanks for the link. I was of course grouping font size with the other
'basic errors' which I said I would look into. I will report back when
I have done some fixing later today. Still struggling to my thumbnails
into a horizontal line though...

Well, from your earlier post, you must be done struggling now, right?
After you've changed your 110px in #pic to, say, 336px, your aunt's
spouse must be named Robert, and the thumbnails arrayed horizontally.
Yes?
I have fixed some (hopefully most) of the basic errors and reuploaded
to http://www.gardenmediaguild.co.uk/awards/index.html

Still can't get those thumbnails to line up horizontally though.
Changing #pic to 336px only gave me the same vertical lineup of images
with a new white block to the right, to the full height of the images.
All possible combinations of #pic dimensions have been tried and the
fix must lie elsewhere.

I also tried creating three different #pic classes, giving each one a
relative left position 114px greater than the previous one -- but this
only moved the second and third images to the right without lifting
them up to line up with the first image. This also messed up with my
hover enlargements which displayed on load instead of on hover.
(Haven't tried the display:none thing yet.)

I have also tried various float options and putting the div inside a
table row at various sizes, percentages and auto, but nothing works.

Unless you have another brainwave, I may be reduced to combining the
three thumbnails into a single image and figuring out if I can use
image maps to reproduce the hover enlargement...

Thanks again for your help.

Stan



Reply With Quote
  #8  
Old   
Gus Richter
 
Posts: n/a

Default Re: Trying to persuade CSS images to line up horizontally - 06-30-2008 , 07:28 PM



Stan The Man wrote:
Quote:
I have fixed some (hopefully most) of the basic errors and reuploaded to
http://www.gardenmediaguild.co.uk/awards/index.html
get rid of:
<link href="css/agl-styles.css" rel="stylesheet" type="text/css"
media="all"/>
which contains markup and no rules.

Quote:
Still can't get those thumbnails to line up horizontally though.
Changing #pic to 336px only gave me the same vertical lineup of images
with a new white block to the right, to the full height of the images.
All possible combinations of #pic dimensions have been tried and the fix
must lie elsewhere.
Two things to take care of your images:

#pic {width: 110px;} is the container for the images, which is too
small to take care of [3x110px + 3x1px + borders + offsets]. Change it to:
#pic {width: 344px;} /* 344px is the minimum here */

display:block will create a new line - stack images on top - remove it:
#pic a.p1, #pic a.p1:visited {/*display: block;*/}
In fact, you also use it in two other rules which are absolutely
positioned. They won't do anything there. This has nothing to do with
your problem in question.

--
Gus


Reply With Quote
  #9  
Old   
John Hosking
 
Posts: n/a

Default Re: Trying to persuade CSS images to line up horizontally - 06-30-2008 , 09:03 PM



Stan The Man wrote:
Quote:
I have fixed some (hopefully most) of the basic errors and reuploaded to
http://www.gardenmediaguild.co.uk/awards/index.html

Still can't get those thumbnails to line up horizontally though.
Changing #pic to 336px only gave me the same vertical lineup of images
with a new white block to the right, to the full height of the images.
The whiteness comes from #pic { background-color: #ffffff; }.

The width is because the 336 is larger than 110 (but smaller than the
344 it needs to be, as Gus has pointed out).

The persistence of the vertical lineup even in a wider #pic is from the
#pic a.p1, #pic a.p1:visited { display:block; }.

Ditch the display:block, give #pic a larger width, and drop the white
background for #pic and #pic a.p1, #pic a.p1:visited (You might not need
the border on those links, either), and see how it looks. Be sure to
test it with images disabled or missing.

Do continue to work on validation the code, especially where you have
extraneous tags. Gus alluded to a problematic style sheet, which appears
to be referenced but missing.


Quote:
I also tried creating three different #pic classes, giving each one a
relative left position 114px greater than the previous one -- but this
only moved the second and third images to the right without lifting them
up to line up with the first image. This also messed up with my hover
enlargements which displayed on load instead of on hover. (Haven't tried
the display:none thing yet.)
Try to avoid actually positioning anything, esp. absolutely. It's hard
to do right (and even harder to do right in all cases), for one thing,
but it's rarely necessary, IME.

Quote:
I have also tried various float options and putting the div inside a
table row at various sizes, percentages and auto, but nothing works.

Unless you have another brainwave, I may be reduced to combining the
three thumbnails into a single image and figuring out if I can use image
maps to reproduce the hover enlargement...
No, no, don't do that. That's too much like work. :-)

Quote:
Thanks again for your help.
YVW

--
John
Pondering the value of the UIP: http://improve-usenet.org/


Reply With Quote
  #10  
Old   
BootNic
 
Posts: n/a

Default OT: Trying to persuade CSS images to line up horizontally - 06-30-2008 , 10:56 PM



On Mon, 30 Jun 2008 07:02:42 -0400
"Beauregard T. Shagnasty" <a.nony.mous (AT) example (DOT) invalid> wrote in:
<g4aegj$n6t$1 (AT) registered (DOT) motzarella.org>

[snip]
Quote:
Using Opera, I have to zoom your page to about 120% in order to read
the text at my preferred size.
[snip]

I can only hope that you have chosen not to set your minimum font size.



--

BootNic Mon Jun 30, 2008 10:56 pm
The more you find out about the world, the more opportunities there
are to laugh at it.
*Bill Nye*

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)

iEYEARECAAYFAkhpnNkACgkQylMUzZO6jeImJgCfXhKS4l/I3zLIq4mWMhZzbUTG
+R4An0df+5aSPIcm1TKLmUltA0nzL1aa
=eSPK
-----END PGP SIGNATURE-----



Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.