472,119 Members | 1,701 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

Show image top left in html page, how can I do that ?

Hello,
I want to show an image top left on my html page
http://www.stevanez-juls.de/flyer/20...ars_front.html .
But Firefox and Internet Explorer always show a little border on the top and
the left side.
How can I put the image directly to the top and left border of the window ?

Regards,
Thorsten

Jun 11 '06 #1
9 24922
Hello,
I want to show an image top left on my html page
http://www.stevanez-juls.de/flyer/20...ars_front.html .
But Firefox and Internet Explorer always show a little border on the top and
the left side.
How can I put the image directly to the top and left border of the window ?

Regards,
Thorsten
Hi Thorsten
To get rid of borders you'll need to use CSS. HTML won't do this alone. Try this:

<img style="position: absolute; top: 0; left: 0;" src="">

Regards,
htmelle
Jun 11 '06 #2
Thorsten Kleinweber wrote:
Hello,
I want to show an image top left on my html page
http://www.stevanez-juls.de/flyer/20...ars_front.html .
But Firefox and Internet Explorer always show a little border on the top and
the left side.
How can I put the image directly to the top and left border of the window ?


Thorsten,
The border you're seeing is the margin or padding on the <body>
element. The size of it varies from one browser to another, but it is
non-zero for every browser I've ever used. To eliminate it, try this:
body { margin: 0em; padding: 0em; }

Bye
Philip
http://NikitaTheSpider.com/
Bulk HTML validation, link checking and more

Jun 11 '06 #3
Thorsten Kleinweber wrote:

I want to show an image top left on my html page
http://www.stevanez-juls.de/flyer/20...ars_front.html .
But Firefox and Internet Explorer always show a little border on the top and
the left side.
How can I put the image directly to the top and left border of the window ?

Remove the spacing:
body { margin: 0; padding: 0; }

Also use a proper DTD; the one you show is incomplete. HTML Strict
should be used for all new documents. Transitional was only meant to ease
the coding effort from v3.2 to v4.0.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jun 11 '06 #4

<Ni*************@gmail.com> schrieb im Newsbeitrag
news:11*********************@f6g2000cwb.googlegrou ps.com...
Thorsten Kleinweber wrote:
Hello,
I want to show an image top left on my html page
http://www.stevanez-juls.de/flyer/20...ars_front.html .
But Firefox and Internet Explorer always show a little border on the top
and
the left side.
How can I put the image directly to the top and left border of the window
?


Thorsten,
The border you're seeing is the margin or padding on the <body>
element. The size of it varies from one browser to another, but it is
non-zero for every browser I've ever used. To eliminate it, try this:
body { margin: 0em; padding: 0em; }


Worked, thanks.

Could you perhaps further tell me how I can show the correct title if I open
this page with window.open from another page ?
I try this from http://www.stevanez-juls.de (click on Enter) but there is
only shown the url in the title bar instead of the title I wrote down in the
html file http://www.stevanez-juls.de/flyer/20...ars_front.html

Regards,
Thorsten

Jun 11 '06 #5

"Jim Moe" <jm***************@sohnen-moe.com> schrieb im Newsbeitrag
news:6L******************************@giganews.com ...
Also use a proper DTD; the one you show is incomplete. HTML Strict
should be used for all new documents. Transitional was only meant to ease
the coding effort from v3.2 to v4.0.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


I will change this.
Could you please tell me where I can read the current rules for the doctype
tag ?

Regards,
Thorsten

Jun 11 '06 #6
In article <e6**********@newsreader2.netcologne.de>,
"Thorsten Kleinweber" <zo**************@gmx.de> wrote:
<Ni*************@gmail.com> schrieb im Newsbeitrag
news:11*********************@f6g2000cwb.googlegrou ps.com...
Thorsten Kleinweber wrote:

Could you perhaps further tell me how I can show the correct title if I open
this page with window.open from another page ?
I try this from http://www.stevanez-juls.de (click on Enter) but there is
only shown the url in the title bar instead of the title I wrote down in the
html file http://www.stevanez-juls.de/flyer/20...ars_front.html


Short answer: use location=yes in the window properties.

Long answer: some trial and error would probably have gotten you to this
solution; that's how I got to it. Also, in Safari the title displays
even when location=no which tells me that this behavior is somewhat
browser dependent, so it looks like you have some testing to do. Also,
you have a type in the window properties. "menuebar" should be "menubar".

Last but not least: it's just my opinion, but sites that display popups
tend to make me hostile, I guess because I feel like popups themselves
are themselves hostile. Just my $02.

HTH

--
Philip
http://NiktaTheSpider.com/
Bulk HTML validation, link checking and more
Jun 11 '06 #7
Thorsten Kleinweber wrote:
Also use a proper DTD; the one you show is incomplete. HTML Strict
should be used for all new documents. Transitional was only meant to ease
the coding effort from v3.2 to v4.0.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


I will change this.
Could you please tell me where I can read the current rules for the doctype
tag ?

<http://www.w3.org/TR/html4/struct/global.html#idx-document_type_declaration-3>

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jun 12 '06 #8

"Jim Moe" <jm***************@sohnen-moe.com> schrieb im Newsbeitrag
news:U4******************************@giganews.com ...
Thorsten Kleinweber wrote:
Also use a proper DTD; the one you show is incomplete. HTML Strict
should be used for all new documents. Transitional was only meant to
ease
the coding effort from v3.2 to v4.0.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">


I will change this.
Could you please tell me where I can read the current rules for the
doctype
tag ?

<http://www.w3.org/TR/html4/struct/global.html#idx-document_type_declaration-3>


I tried
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
in one of my files (www.stevanez-juls.de/home2.html) and since then the
height of the top table row was bigger than before
(www.stevanez-juls.de/home.html)
Do you perhaps know why ?

Thanx
Thorsten

Jun 12 '06 #9
Thorsten Kleinweber wrote:

<http://www.w3.org/TR/html4/struct/global.html#idx-document_type_declaration-3>


I tried
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
in one of my files (www.stevanez-juls.de/home2.html) and since then the
height of the top table row was bigger than before
(www.stevanez-juls.de/home.html)
Do you perhaps know why ?

Browsers, especially IE, use different default margin and padding
depending the DTD indicated. Yours is such a case.
You do not explicitly set any margin or padding for <td>, <p>, or
anything else (except the body, in two places!).
You should also correct the validation errors that arise when changing
to Strict:
<http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.stevanez-juls.de%2Fhome2.html>

--
jmm (hyphen) list (at) sohnen-moe (dot) com
(Remove .AXSPAMGN for email)
Jun 13 '06 #10

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

11 posts views Thread by Chris Beall | last post: by
reply views Thread by leo001 | last post: by

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.