By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,648 Members | 1,203 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,648 IT Pros & Developers. It's quick & easy.

Have a linked image arrive--centered.

P: n/a
I'm a newbie, so please forgive the naive request here--but I haven't
been able to figure this out...Isn't there a way in CSS, to have a
plain-old medium-sized (say, 2- or 300-pixels square) image that you
set a link to, when it appears in new window, to be already centered
on page? I have no trouble getting a pic to appear, but they're always
in the upper-left corner, and I can't figure out what tag or
declaration or correct sequence to use to change this to CENTER.

Thanks in advance.
Terry
Jul 20 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Terry B. wrote:
I'm a newbie, so please forgive the naive request here--but I haven't
been able to figure this out...Isn't there a way in CSS, to have a
plain-old medium-sized (say, 2- or 300-pixels square) image that you
set a link to, when it appears in new window, to be already centered
on page? I have no trouble getting a pic to appear, but they're always
in the upper-left corner, and I can't figure out what tag or
declaration or correct sequence to use to change this to CENTER.


You can only centre an image if it is in document.
http://dorward.me.uk/www/centre/

--
David Dorward http://dorward.me.uk/
Jul 20 '05 #2

P: n/a
ri********@comcast.net (Terry B.) wrote:
I'm a newbie, so please forgive the naive request here--but I haven't
been able to figure this out...Isn't there a way in CSS, to have a
plain-old medium-sized (say, 2- or 300-pixels square) image that you
set a link to, when it appears in new window, to be already centered
on page? I have no trouble getting a pic to appear, but they're always
in the upper-left corner, and I can't figure out what tag or
declaration or correct sequence to use to change this to CENTER.


Use Opera instead. It centres stand alone images.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #3

P: n/a
Steve Pugh <st***@pugh.net> wrote in message news:<o1********************************@4ax.com>. ..
ri********@comcast.net (Terry B.) wrote:
I'm a newbie, so please forgive the naive request here--but I haven't
been able to figure this out...Isn't there a way in CSS, to have a
plain-old medium-sized (say, 2- or 300-pixels square) image that you
set a link to, when it appears in new window, to be already centered
on page? I have no trouble getting a pic to appear, but they're always
in the upper-left corner, and I can't figure out what tag or
declaration or correct sequence to use to change this to CENTER.


Use Opera instead. It centres stand alone images.

Steve


Much thanks to David and Steve for the concise, helpful answers! I was
assuming that there was/is a simple, straightforward method to achieve
the linked-image-autocentered effect, but now that you've told me it's
just another oddball 'hole' in CSS capabilities I feel not-as-dense.

Thanks for your time and attention to detail!
Jul 20 '05 #4

P: n/a
ri********@comcast.net (Terry B.) wrote:
Much thanks to David and Steve for the concise, helpful answers! I was
assuming that there was/is a simple, straightforward method to achieve
the linked-image-autocentered effect, but now that you've told me it's
just another oddball 'hole' in CSS capabilities I feel not-as-dense.


It's not a hole in CSS.

You apply CSS to every HTML document by associating a stylesheet to it
(via <link> or <style> or style="").
You then link to a JPG (for example) file. The browser loads that file
into the window in place of the HTML page. Obviously there's no
stylesheet associated with the JPG file.

You might as well ask how to apply CSS to an HTML page without
including any actual CSS code.

If you want to apply CSS to how the image is displayed then follow
David's advice and place the image in a web page.

Steve

--
"My theories appal you, my heresies outrage you,
I never answer letters and you don't like my tie." - The Doctor

Steve Pugh <st***@pugh.net> <http://steve.pugh.net/>
Jul 20 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.