473,503 Members | 11,435 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Help Positioning Images alternative to Tables

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
5 2390
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
32028
by: Bryan R. Meyer | last post by:
Hello Everyone, The problem of browser resizing has become an issue for me. While redesigning my webpage, I set the left and right margins to be auto so that my content would be centered. ...
36
4075
by: Jack Hughes | last post by:
This argument has come up two or three times lately. We have a web standards document at our company that say "Use valid HTML 4; We don't recommend switching to DIV-based CSS-P for layout just...
2
7740
by: Stephen Weatherly | last post by:
Could anyone please help me with a problem I am having with my table widths??? If I have 2 images within a td tag, but using CSS relative positioning I position one over the top of the second (I...
1
1625
by: RWC | last post by:
Hey Folks! I'm having trouble with an asp page. First off, I'm new to the html / asp world, but not to software development. I'd like to minimize or "normalize" the site, so I'm trying to use...
1
2794
by: Charles Harrison Caudill | last post by:
with tables there is a clean and algorithmic way to organize things, but with css which is, once you get it working, much cleaner, I have to tweak and patch and hope and pray and curse before...
6
1367
by: | last post by:
I just installed VS 2005. Was working with 2003 and .Net 1.1. Trying to get the feel for a master page and I'm having some issues. I'm looking for a pretty basic setup. Standard header with an...
4
1456
by: steve | last post by:
Hi All I am having annoying problems with VS 2005 (VB) positioning tables on a web page If I create HTML tables for layout, sometimes the next table sits at the bottom of the above table and...
61
4667
by: phil-news-nospam | last post by:
Why does SVG need a different tag than other images? IMHO, SVG should be implemented as an image type just like any other image type, allowing it to work with <img> tags, and ... here is the...
14
3286
by: Fistro | last post by:
I'm trying to find a design that would allow me to build web pages without having to worry about compatibility issues (not too much, in any case,,,) I've came across this CSS layout technique:...
0
7067
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7264
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7316
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
5562
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
4992
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
3160
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3148
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
728
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
371
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.