473,408 Members | 1,982 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,408 software developers and data experts.

vertical alighnemt of images under text

A hopefully quick question...

I would like to position a graphic in a header bar so that:

- the image is on the left end, centred vertically.
- the text is centred horizontally, and when necessary flows over the image
- the header bar height matches which over is larger, the height of the
image, or the text.

Here is a page that illustrates what I have come up with and a graphic
representation of what I am looking for.

http://www.marenger.com/textWrapping/

If I set the image as a background, the height is determined by the text and
the bottom of the image sometimes gets chopped off.

If the images is floated left, I can't get the text to appear on top of it.
It wraps around instead.

Thanks for your assistance!

Carolyn
--
Carolyn Marenger

Sep 17 '06 #1
2 1292
carolyn <ca****@marenger.comwrote:
>I would like to position a graphic in a header bar so that:

- the image is on the left end, centred vertically.
- the text is centred horizontally, and when necessary flows over the image
- the header bar height matches which over is larger, the height of the
image, or the text.

Here is a page that illustrates what I have come up with and a graphic
representation of what I am looking for.

http://www.marenger.com/textWrapping/
Real content please.

"My New Blog - A blog about myself and some of the strange things that
happen in my life." is not proper header content. The header content
should be something like "Carolyn's blog" with "A blog about myself and
some of the strange things that happen in my life." as the first
paragraph beneath it.

On my screen it is nigh impossible to read the text when it is displayed
on top of the image.
>If I set the image as a background, the height is determined by the text and
the bottom of the image sometimes gets chopped off.

If the images is floated left, I can't get the text to appear on top of it.
It wraps around instead.
Some of your options are setting the line height for the header text
equal to the height of the image, or use a single cell table with
"valign=middle" and specifying a minimum-height (+ hack for IE).

--
Spartanicus
Sep 17 '06 #2
Spartanicus wrote:
carolyn <ca****@marenger.comwrote:
>>I would like to position a graphic in a header bar so that:

- the image is on the left end, centred vertically.
- the text is centred horizontally, and when necessary flows over the
image - the header bar height matches which over is larger, the height of
the image, or the text.

Here is a page that illustrates what I have come up with and a graphic
representation of what I am looking for.

http://www.marenger.com/textWrapping/

Real content please.
I have worked out a solution. Thanks for the advice.
"My New Blog - A blog about myself and some of the strange things that
happen in my life." is not proper header content. The header content
should be something like "Carolyn's blog" with "A blog about myself and
some of the strange things that happen in my life." as the first
paragraph beneath it.
Actually, I like the effect of a two to four word 'title' as the <h1>
content, followed by a descriptive sentence as a 'subtitle'. I then set
the style sheet to merge the two lines, so that it ideally appears as one
line. This only works however with short a 'title' and a 'description'.
It loses the effect if it is going to wrap.
On my screen it is nigh impossible to read the text when it is displayed
on top of the image.
I think I have fixed that with the real image I have since created. That
was just a slap together image - 30 seconds or so with the Gimp.
>>If I set the image as a background, the height is determined by the text
and the bottom of the image sometimes gets chopped off.

If the images is floated left, I can't get the text to appear on top of
it. It wraps around instead.

Some of your options are setting the line height for the header text
equal to the height of the image, or use a single cell table with
"valign=middle" and specifying a minimum-height (+ hack for IE).
I don't use tables for layout, but I will remember the line height.

Thanks again!

Carolyn
--
Carolyn Marenger

Sep 19 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

10
by: Markus Ernst | last post by:
Hi I have a strange problem with vertical-align. The case can be viewed at http://www.brainput.info/geschichte.html. HTML code: <div id="bild"><img src="geschichte.gif" width="274"...
2
by: chris_culley | last post by:
Hi, I'm fairly new to using css, and have been using it to format a vertical navigation bar on my website, producing a load of buttons on top of each other, each with a (151 * 33 px) gif as the...
13
by: Egil Helland | last post by:
I am trying to create a breadcrumb with both icons and text, looking like: Home > Trail > Trail Now, how on earth do I get the images and text to vertically align so that the vertical...
4
by: Gabriella | last post by:
hi, I am writing a simple bulleted list with ul/li, with my image as the list-style-image, and for some reason the image bullet on IE only (FF is fine) is vertically aligned to the top. Meaning,...
1
by: dave8421 | last post by:
Hi, I have a (strict) html document with the following portion: <ul> <li><img alt="" src="images/image1.jpg" /></li> <li><img alt="" src="images/image2.jpg" /></li> <li><img alt=""...
1
by: bulldog8 | last post by:
I am working on a picture preview page ... some questions and suggestions have been incorporated already, but the 'user' (i.e. wife!) would like it to be more user friendly (if it isn't one thing,...
3
by: acunnon | last post by:
I am trying to put together an login page my problem is getting the three items aligned to the middle verticaly without specifing a height to anything on the page. CSS html{ height:100%;...
8
by: ayamopamo | last post by:
Hi- I am trying to center a web page. It seems like this should be very simple to do, but apparently it isn't my day. I have successfully centered the background by calling it in the css body tag:...
13
by: Bill | last post by:
Hi How can I have IE7 act correctly on that ? The rules make the link text go down when hovered. It works in FF , I had to add a hard space right after the LI tag to have OP9 work but I can't...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
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,...
0
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...

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.