Welcome to MobyThreads.com!
FAQFAQ      ProfileProfile    Private MessagesPrivate Messages   Log inLog in
All support for the MobyThreads Threaded phpBB MOD can now be found on welsolutions at this forum

CSS - align images inside

 
   Web Hosting and Web Master Forums (Home) -> Webmaster RSS
Next:  Google's new look  
Author Message
neilr

External


Since: Jul 18, 2003
Posts: 17



(Msg. 1) Posted: Mon Mar 29, 2004 6:46 pm
Post subject: CSS - align images inside
Archived from groups: alt>www>webmaster (more info?)

Hi,

Well I'm trying to get myself into the practice of using CSS for layout
instead of using tables, so I thought I'd mess around with placing a couple
of images inside a background area, but already I have more questions than
answers.

See and example of what I am trying to do
http://www.special-editions.net/imagelayout.html

In the example each image is a hyperlink pointing to a different URL. I
would like to place the two images directly above each other so that there
is no horizontal gap between them. Also I'd like to centre the images
horizontally within the grey background panel so that the two images appear
as a single white rectangle with a black outline.

I've been pretty much guessing my way through this so far so I wouldn't be
surprised if I've got the whole notion of how to go about this, wrong - any
and all advice welcome Smile

Neil

 >> Stay informed about: CSS - align images inside <div&gt; 
Back to top
Login to vote
wsmoake

External


Since: Jun 29, 2003
Posts: 74



(Msg. 2) Posted: Mon Mar 29, 2004 6:46 pm
Post subject: Re: CSS - align images inside [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

On Mon, 29 Mar 2004 15:46:15 +0100, "puk" <neilr.TakeThisOut@pages-uk.com> wrote:

 >Hi,
 >
 >Well I'm trying to get myself into the practice of using CSS for layout
 >instead of using tables, so I thought I'd mess around with placing a couple
 >of images inside a background area, but already I have more questions than
 >answers.
 >
 >See and example of what I am trying to do
 >http://www.special-editions.net/imagelayout.html
 >
 >In the example each image is a hyperlink pointing to a different URL. I
 >would like to place the two images directly above each other so that there
 >is no horizontal gap between them. Also I'd like to centre the images
 >horizontally within the grey background panel so that the two images appear
 >as a single white rectangle with a black outline.
 >
 >I've been pretty much guessing my way through this so far so I wouldn't be
 >surprised if I've got the whole notion of how to go about this, wrong - any
 >and all advice welcome Smile
 >
 >Neil
 >
This works to do what you want:

<p align="center"><a href="http://MyLink1.com" target="_blank"><img
src="top.gif"
border="0"></a><br>
<a href="http://MyLink2.co.uk" target="_blank"><img src="bottom.gif"
border="0"></a></p><!-- ~MESSAGE_AFTER~ -->

 >> Stay informed about: CSS - align images inside <div&gt; 
Back to top
Login to vote
spambouncer

External


Since: Aug 16, 2003
Posts: 79



(Msg. 3) Posted: Tue Mar 30, 2004 2:11 am
Post subject: Re: CSS - align images inside [Login to view extended thread Info.]
Archived from groups: per prev. post (more info?)

"puk" <neilr.RemoveThis@pages-uk.com> wrote in message
news:7IW9c.28000$Y%6.3286587@wards.force9.net...
 > Hi,
 >
 > Well I'm trying to get myself into the practice of using CSS for layout
 > instead of using tables, so I thought I'd mess around with placing a
couple
 > of images inside a background area, but already I have more questions than
 > answers.
 >
 > See and example of what I am trying to do
<font color=purple> > <a style='text-decoration: underline;' href="http://www.special-editions.net/imagelayout.html</font" target="_blank">http://www.special-editions.net/imagelayout.html</font</a>>
 >
 > In the example each image is a hyperlink pointing to a different URL. I
 > would like to place the two images directly above each other so that there
 > is no horizontal gap between them. Also I'd like to centre the images
 > horizontally within the grey background panel so that the two images
appear
 > as a single white rectangle with a black outline.
 >
 > I've been pretty much guessing my way through this so far so I wouldn't be
 > surprised if I've got the whole notion of how to go about this, wrong -
any
 > and all advice welcome Smile
 >


Sorry don't have time to work it out, but it looks like you simply need a
"display:block" as images sit among text otherwise

....depending on your browser, YMMV

--
"There are more questions than answers being asked at the moment."
(STAN COLLYMORE, Radio 5 Live)

<a style='text-decoration: underline;' href="http://www.private-eye.co.uk" target="_blank">http://www.private-eye.co.uk</a><!-- ~MESSAGE_AFTER~ -->
 >> Stay informed about: CSS - align images inside <div&gt; 
Back to top
Login to vote
Display posts from previous:   
Related Topics:
How do I align this correctly ? - I have a JavaScript at the bottom of my webpage http://www.surroundedbyangels.com How do I align it where it is not crossing over to the border graphic on the left ? Any help would be greatly appreciated :) SBA -- "I knew you even before you we...

CSS equivalent of <table align="center"> - Hi, all, (Please forgive me if this shows up twice - I had problems with the first one). I'm working on a web site with a request I can't quite figure out how to handle. Basically, the top graphics and menu bar are 670 pixels wide. The customer..

Can't top-align search box on this simple page. - http://www.touristguides.com.my/templates/header.htm The search box on the page aligns itself to the top although I have made it bottom-aligned. I have also tried moving the <form></form>before and after the <td> or <table> tag. ...

includes inside another incudes? - I´m using some ssi and I have a question: can I use an include, with another include in it?? thanks -- -------------------------------------- Part of the "No Signature Movement" My site: http://www.webbasica.com And for all those spammers ...

(((Looking for a WEB DESIGNER))) Anybody interested, read .. - Hello, My company is looking for a web designer. We are located in Canoga Park, CA. near Woodland Hills, CA. Anybody interested can email us to leads@centurylist.com. The project is to modify an existing web site. Thank you. ja
   Web Hosting and Web Master Forums (Home) -> Webmaster All times are: Pacific Time (US & Canada) (change)
Page 1 of 1

 
You can post new topics in this forum
You can reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum



[ Contact us | Terms of Service/Privacy Policy ]