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

Help Positioning Images alternative to Tables

P: n/a
I have seen a lot of examples of 2 & 3 Collumn layout schemes. But I have
not
yet found any examples for positioning images and centering them by the
browser.
I notice that there are CSS properties for Left and Right, but not for
Centering.

So my question is How does one center an image to the Browser window?
I was thinking about converting a page for my friends catering. It's a table
center in the
page with a reef in the middle. I put some leaves in a few cells. The URL
ins www.laurelscatering.com.

I would like to start using CSS for design. But haven't quite figured out
how to get things positioned like I wish. I some one could offer an example
layout that would reply my table, I could probably figure out how to use
CSS. Otherwise I'll stick to using tables, and use CSS for Text and HTML Tag
formating.

Thanks

Howard
Nov 19 '06 #1
Share this Question
Share on Google+
5 Replies


P: n/a
Howard wrote:
....
So my question is How does one center an image to the Browser window?
<div style="text-align: center">
<img src="path/to/filename.jpg" alt="relevant text here..." title="title
text if desired..." height="200" width="200">
</div>

...using the exact height and width of your image, of course.
... Otherwise I'll stick to using tables, and use CSS for Text and
HTML Tag formating.
That would be sooo 1990s ...

--
-bts
-Motorcycles defy gravity; cars just suck
Nov 19 '06 #2

P: n/a
Howard wrote :
I have seen a lot of examples of 2 & 3 Collumn layout schemes. But I have
not
yet found any examples for positioning images and centering them by the
browser.
Really?

CSS Horizontal alignment:
when to use margin-left, margin-right and when to use text-align
http://www.gtalbot.org/NvuSection/Nv...Alignment.html

Centering lines of text at CSS tips and tricks from W3C
http://www.w3.org/Style/Examples/007/center.html#text
I notice that there are CSS properties for Left and Right,
that's for positioning, non-static positioning.

but not for
Centering.
CSS 1 horizontal formating (margin property): "if both 'margin-left' and
'margin-right' are 'auto', they will be set to equal values. This will
center the element inside its parent."
http://www.w3.org/TR/CSS1#horizontal-formatting

CSS 1 text-align property says: "The [text-align] property describes how
text (and inline elements) is aligned within the element."
http://www.w3.org/TR/CSS1#text-align
So my question is How does one center an image to the Browser window?
I was thinking about converting a page for my friends catering. It's a table
center in the
page with a reef in the middle.
Howard, please bookmark this page:

Using Web standards in your webpages
http://developer.mozilla.org/en/docs...your_Web_Pages

(A more recent update to that webpage will be done in a few days)

Gérard
--
remove blah to email me
Nov 19 '06 #3

P: n/a
Thanks to Gerard & Beuaregard.

Probably because of the GUI interface in Dreamweaver, I wasn't thinking
about elements when looking at "Text Align". I was thinking about it be used
for Text.

Thank for the URL's. I'll check them out.

Howard

"Gérard Talbot" <ne***********@gtalbot.orgwrote in message
news:12*************@corp.supernews.com...
Howard wrote :
>I have seen a lot of examples of 2 & 3 Collumn layout schemes. But I have
not
yet found any examples for positioning images and centering them by the
browser.

Really?

CSS Horizontal alignment:
when to use margin-left, margin-right and when to use text-align
http://www.gtalbot.org/NvuSection/Nv...Alignment.html

Centering lines of text at CSS tips and tricks from W3C
http://www.w3.org/Style/Examples/007/center.html#text
>I notice that there are CSS properties for Left and Right,

that's for positioning, non-static positioning.

but not for
>Centering.

CSS 1 horizontal formating (margin property): "if both 'margin-left' and
'margin-right' are 'auto', they will be set to equal values. This will
center the element inside its parent."
http://www.w3.org/TR/CSS1#horizontal-formatting

CSS 1 text-align property says: "The [text-align] property describes how
text (and inline elements) is aligned within the element."
http://www.w3.org/TR/CSS1#text-align
>So my question is How does one center an image to the Browser window?
I was thinking about converting a page for my friends catering. It's a
table center in the
page with a reef in the middle.

Howard, please bookmark this page:

Using Web standards in your webpages
http://developer.mozilla.org/en/docs...your_Web_Pages

(A more recent update to that webpage will be done in a few days)

Gérard
--
remove blah to email me

Nov 21 '06 #4

P: n/a
Thanks,

Took me a while to make sense of all the CSS rules. Now I'm starting to add
Menu's and overflow property with scrolling text. Moving in the right
direction.

"Howard" <ho*****@pacbell.netwrote in message
news:lb*****************@newssvr14.news.prodigy.co m...
>I have seen a lot of examples of 2 & 3 Collumn layout schemes. But I have
not
yet found any examples for positioning images and centering them by the
browser.
I notice that there are CSS properties for Left and Right, but not for
Centering.

So my question is How does one center an image to the Browser window?
I was thinking about converting a page for my friends catering. It's a
table center in the
page with a reef in the middle. I put some leaves in a few cells. The URL
ins www.laurelscatering.com.

I would like to start using CSS for design. But haven't quite figured out
how to get things positioned like I wish. I some one could offer an
example layout that would reply my table, I could probably figure out how
to use CSS. Otherwise I'll stick to using tables, and use CSS for Text and
HTML Tag formating.

Thanks

Howard

Mar 21 '07 #5

P: n/a
Howard wrote:
>
Took me a while to make sense of all the CSS rules. Now I'm starting to add
Menu's and overflow property with scrolling text. Moving in the right
direction.
Sorry, but that sounds like the wrong direction to me. :(
>www.laurelscatering.com.
Why is there such a narrow column for the content? There are only about
3 words per line with big empty spaces on the left and right sides. Not
very efficient use of the available screen real estate.

Shall I mention that the code is pretty dismal?

--
Berg
Mar 21 '07 #6

This discussion thread is closed

Replies have been disabled for this discussion.