473,322 Members | 1,241 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,322 software developers and data experts.

vertical-align

I'm making a site about Java(programming language). The problem is
that I worked with layers(div). I wanted to make a title in 1 of
these layers and ceter this vertically. But this doesn't look to
work.
This is how I did it:

<html>
<head>
<title>De programmeertaal Java</title>
<style>
h1 {font-size:50; font-family:Times New Roman; text-align:center;}
</style>
</head>
<body>
<div id="logo" style="position:absolute; visibility:inherit;
width:250px; height:250px;
left:5; top:5; z-index:4;
background-image:url('logo_background.png')">
<img src="javalogo.png"></img>
</div>

<div id="header" style="position:absolute; visibility:inherit;
width:740px; height:200px;
left:255; top:5; z-index:2;
background-image:url('header_background.png')">
<h1>De programmeertaal Java</h1>
</div>

</body>
</html>

Somebody has got an idea?

Thanks,
Blomme Thomas
Jul 21 '05 #1
4 6386
pieter blomme wrote:

The problem is that I worked with layers(div). I wanted to make a title
in 1 of these layers and ceter this vertically. But this doesn't look to
work.
Your technique appears to be based on guesswork as to what font size the
text will end up as. You can't know this for sure, so its bound to fail.

The simple way is:

#container { display: table-cell; vertical-align: middle; }

.... but Internet Explorer doesn't support this. If you can afford to have
your style ignored by that overly common user-agent, then that's the way to
go about it. Otherwise, you're rather stuck.
h1 {font-size:50; font-family:Times New Roman; text-align:center;}
You need to validate your CSS. 50 what? You should probably read
http://css-discuss.incutio.com/?page=FontSize too.
left:5; top:5; z-index:4;
More syntax errors
<img src="javalogo.png"></img>


The alt attribute is required, the </img> tag violates the HTML
compatability guidelines.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 21 '05 #2
in comp.infosystems.www.authoring.stylesheets, pieter blomme wrote:
ce[n]ter this vertically


http://www.student.oulu.fi/~laurirai/www/css/middle/

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Jul 21 '05 #3
me
"pieter blomme" <bl**********@hotmail.com> wrote in message
news:5f**************************@posting.google.c om...
I'm making a site about Java(programming language). The problem is
that I worked with layers(div). I wanted to make a title in 1 of
these layers and ceter this vertically. But this doesn't look to
work.
This is how I did it:

<html>
<head>
<title>De programmeertaal Java</title>
<style>
h1 {font-size:50; font-family:Times New Roman; text-align:center;}
</style>
</head>
<body>
<div id="logo" style="position:absolute; visibility:inherit;
width:250px; height:250px;
left:5; top:5; z-index:4;
background-image:url('logo_background.png')">
<img src="javalogo.png"></img>
</div>

<div id="header" style="position:absolute; visibility:inherit;
width:740px; height:200px;
left:255; top:5; z-index:2;
background-image:url('header_background.png')">
<h1>De programmeertaal Java</h1>
</div>

</body>
</html>

Somebody has got an idea?

Thanks,
Blomme Thomas


In the following I moved h1 into the div named logo, I also got rid of the
50 in the h1 style, you didn't specify the units and it looked too big to
fit in the div without wrapping. See below:
Good Luck,
me

<html>
<head>
<title>De programmeertaal Java</title>
<style>
h1 {font-family:"Times New Roman"; text-align:center;}
</style>
</head>
<body>
<div id="logo" style="position:absolute; visibility:inherit;
width:250px; height:250px;
left:5; top:5; z-index:4;
background-image:url('logo_background.png')">
<img src="javalogo.png"><img>
<h1>De programmeertaal Java</h1></div>

<div id="header" style="position:absolute; visibility:inherit;
width:740px; height:200px;
left:255; top:5; z-index:2;
background-image:url('header_background.png')"> </div>

</body>
</html>
Jul 21 '05 #4
me
"me" <anonymous@_.com> wrote in message
news:11************@corp.supernews.com...
"pieter blomme" <bl**********@hotmail.com> wrote in message
news:5f**************************@posting.google.c om...
I'm making a site about Java(programming language). The problem is
that I worked with layers(div). I wanted to make a title in 1 of
these layers and ceter this vertically. But this doesn't look to
work.
This is how I did it:

<html>
<head>
<title>De programmeertaal Java</title>
<style>
h1 {font-size:50; font-family:Times New Roman; text-align:center;}
</style>
</head>
<body>
<div id="logo" style="position:absolute; visibility:inherit;
width:250px; height:250px;
left:5; top:5; z-index:4;
background-image:url('logo_background.png')">
<img src="javalogo.png"></img>
</div>

<div id="header" style="position:absolute; visibility:inherit;
width:740px; height:200px;
left:255; top:5; z-index:2;
background-image:url('header_background.png')">
<h1>De programmeertaal Java</h1>
</div>

</body>
</html>

Somebody has got an idea?

Thanks,
Blomme Thomas


In the following I moved h1 into the div named logo, I also got rid of the
50 in the h1 style, you didn't specify the units and it looked too big to
fit in the div without wrapping. See below:
Good Luck,
me

<html>
<head>
<title>De programmeertaal Java</title>
<style>
h1 {font-family:"Times New Roman"; text-align:center;}
</style>
</head>
<body>
<div id="logo" style="position:absolute; visibility:inherit;
width:250px; height:250px;
left:5; top:5; z-index:4;
background-image:url('logo_background.png')">
<img src="javalogo.png"><img>
<h1>De programmeertaal Java</h1></div>

<div id="header" style="position:absolute; visibility:inherit;
width:740px; height:200px;
left:255; top:5; z-index:2;
background-image:url('header_background.png')"> </div>

</body>
</html>


My mistake, I centered it horizontally. If I'm to have any chance of fixing
this I need to see the whole page, post URL please.
Signed,
me
Jul 21 '05 #5

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

Similar topics

10
by: John Baker | last post by:
Hi: I have a user who has labels that are set up 3 across and 11 vertical (which is unusual at best), and he wants me to print names and addresses on them. I have already set up for labels 10...
0
by: GiladP1 | last post by:
Hi, I am trying to create a vertical label or a vertical text box by useing their 'Vertical' property. But the text just disapears. I can manage to get right-to-left text to be vertical but...
1
by: James Dean | last post by:
Can you make vertical text in a richtextbox or is there any way around this like make the string vertical outside the textbox then try to paste it in that way into the textbox?.... *** Sent...
7
by: bienwell | last post by:
Hi, I'm using the CheckBoxList control in ASP.NET for Web development. This checkboxlist is bound by the database. If we have more items for this checkbox list, it takes space on the page. I...
0
by: DraguVaso | last post by:
Hi, I'm having a DataGrid on which I want to draw 2 moveable vertical lines. What should happen is: When I move a vertical line, I have somewhere an indication on which character in the datagrid...
5
by: Rico | last post by:
I have label that I need to be vertical. The problem is that when I select "Vertical=yes" the label reads from top to bottom rather than bottom to top (which i need). Can this be done? Any...
3
by: Avi G | last post by:
Hi, i work with VS 2005 and i need to know how to put the windows time(Clock) on my label that it is on the form that i will see the full time include the second as they move, and i need to know...
2
by: akm | last post by:
I am facing an issue with the vertical scroll bar. Actually i am using data grid to display the data in my tables, and also i am using the same view form to diplay the data for different tables....
3
by: Spiros Bousbouras | last post by:
The fact that vertical tab and form feed exist both in the basic source character set and the basic execution character set suggests to me that there is a class of display devices where vertical...
1
by: Tom | last post by:
First, I posted a similar request for help in another group and now don't find the posting. Problem with my newsreader perhaps ... but apologies if this appears as a cross posting. My code is...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

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.