Centering a Logo (1024x768 Vs. 800x600)

  • aleguia
  • Student
  • Student
  • aleguia
  • Posts: 67

Post 3+ Months Ago

Hello!!

I need to put a Logo in the welcome page but I'm having problems with the screen resolution.

If the user has his configuration in 800x600 I need that the logo appear in the whole screen, but if the user has his conf. in 1024, I need that the logo appear exactly in the middle.

I'm working with Dreamweaver MX. How do I do that??

Kindest Regards,

Alejandro.
  • darkthroniar
  • Beginner
  • Beginner
  • User avatar
  • Posts: 42
  • Loc: Los Angeles, CA

Post 3+ Months Ago

Hi

Create a 1x1 table and center it (easy way) :).. or use layers and try to center it with javascript
  • aleguia
  • Student
  • Student
  • aleguia
  • Posts: 67

Post 3+ Months Ago

How can I center it Vertically?

I selected the table and in the properties I put CENTER, but that only center horizontally.
  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Posts: 5148
  • Loc: SC-USA

Post 3+ Months Ago

Code: [ Select ]
<table width="100%" height="100%">
<tr>
   <td align="center"><img></td></tr></table>
  1. <table width="100%" height="100%">
  2. <tr>
  3.    <td align="center"><img></td></tr></table>


This is the basic structure of the table you need. The important attributes are the 'height' and 'width' in the TABLE tag, and the 'align' in the TD tag.

I write my code by hand, so I'm not sure what buttons you need to push in Dreamweaver. Sorry.
  • darkthroniar
  • Beginner
  • Beginner
  • User avatar
  • Posts: 42
  • Loc: Los Angeles, CA

Post 3+ Months Ago

Height=100%????? sometimes don't works


i make this with CSS and works fine

Code: [ Select ]
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style>
<!--
.centered {
 position: relative;
 top: 50%;
 left: 50%;
 width: 100%;
 height: 100%;
 margin-left:-101px;
 margin-top:-50px;
}
-->
</style>
</head>

<body>
<div class="centered" ><img src="Logo.jpg" width="202" height="100"></div>
</body>
</html>
  1. <html>
  2. <head>
  3. <title>Untitled Document</title>
  4. <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
  5. <style>
  6. <!--
  7. .centered {
  8.  position: relative;
  9.  top: 50%;
  10.  left: 50%;
  11.  width: 100%;
  12.  height: 100%;
  13.  margin-left:-101px;
  14.  margin-top:-50px;
  15. }
  16. -->
  17. </style>
  18. </head>
  19. <body>
  20. <div class="centered" ><img src="Logo.jpg" width="202" height="100"></div>
  21. </body>
  22. </html>


hope this help you ;)
  • digitalMedia
  • a.k.a. dM
  • Genius
  • User avatar
  • Posts: 5148
  • Loc: SC-USA

Post 3+ Months Ago

height="100%" works fine in IE and Mozilla browsers. Opera doesn't recognize it.

darkthroniar: Your code works fine in IE, but in Firefox it evokes vertical and horizontal scrollbars and in Opera the image is offset above the viewable area and it evokes that pesky horizontal scrollbar, as well.
  • darkthroniar
  • Beginner
  • Beginner
  • User avatar
  • Posts: 42
  • Loc: Los Angeles, CA

Post 3+ Months Ago

I know that this code don't work in all browsers..

You can change the CSS values to adapt it

Maybe width and height 50%

and i never user opera so i don't know how it's works :)

Post Information

  • Total Posts in this topic: 7 posts
  • Users browsing this forum: No registered users and 27 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.