Log in

View Full Version : CSS Logo Drops to center of page



brecken
07-23-2009, 04:40 PM
I am using a Dynamic Drive template. The "logo" location in the CSS is where I want it but I run IE or Netscape, the logo does not apper and the column drops half the page. Why does the logo not appear and why do I have the "content" drop 1/2 page?
CSS:
<meta name="description" content="breckenridge & associates offers enterprising software solutions for customer relationship management, supply chain management, enterprise asset management and more. For complete details visit breckenridge-assoc.com."" />
<link href="default.css" rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<!-- start header -->
<div id="header">
<div id="logo">
<p><a href="logoa.jpg">breckenridge & aocciates</a></p>

</div>

</div>
<!-- end header -->
<!-- start page -->
<div id="page">
<!-- start content -->
<div id="logo">
<img src ="logoa.jpg"
align = top;
height = "198"
width = "435"
alt = 'breckenridge & associates'>
</div>
<div id="content">
<div class="post">

tonyking
07-28-2009, 02:00 AM
Looks like your logo is inside paragraph <p> tags. Paragraph tags come with default margins in most browsers. You can override the margins using .css or just move your logo outside of the paragraph tags.

Also this:
<img src ="logoa.jpg"
align = top;
height = "198"
width = "435"
alt = 'breckenridge & associates'>

Is not correct... you have some syntax errors there. This is what it should look like based on what you have:

<img src="logoa.jpg" align="top" height="198" width="435" alt="breckenridge & associates">

I would use .css to apply the alignment, height, and width so it's better supported like this:

<img src="logoa.jpg" alt="breckenridge & associates" style="width:435px; height:198px; vertical-align: top;">