March 4, 200917 yr rather new to using CSS to style a page layout and I have two small issues!! In my title div, i cant get the text to align with the image, when you view this in a browser the text sits above the the box slightly? can anyone help me? also how do i get rid of the space at the top between the title area and the browser!! Cheers in advanced screen shot of problem CSS #Title { background-color: #660000; height: 90px; width: 900px; z-index: 1; font-family: Arial, Helvetica, sans-serif; font-size: 36px; color: #CCCCCC; top: 0px; line-height: 15px; margin-top: 5px; margin-right: auto; margin-bottom: auto; margin-left: auto; } #Wrapper { margin: auto; width: 900px; height: 300px; } #Links { font-family: Arial, Helvetica, sans-serif; background-color: #CCCCCC; float: left; height: 650px; width: 295px; padding-top: 5px; padding-left: 5px; line-height: 25px; font-variant: normal; } .Links { font-family: Arial, Helvetica, sans-serif; font-size: 16px; line-height: 25px; color: #000000; text-decoration: none; } #MainContent { background-color: #CCCCCC; float: right; height: 650px; width: 595px; padding-left: 5px; } #Container { width: 100%; height: 650px; margin-top: 0px; margin-right: auto; margin-bottom: 0px; margin-left: auto; top: 0px; } h1 { font-family: Arial, Helvetica, sans-serif; font-size: 36px; font-weight: normal; } h2 { font-family: Arial, Helvetica, sans-serif; font-size: 20px; font-weight: normal; text-decoration: none; } HTML <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" id="Container"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link rel="shortcut icon" href="favicon.ico" > <title>Adur Aviation | Home</title> <style type="text/css"> <!-- body { margin-left: 0px; margin-top: 0px; margin-right: 0px; margin-bottom: 0px; } --> </style></head> <!-- TemplateBeginEditable name="doctitle" --> <!-- TemplateEndEditable --> <link href="CSS/Layout.css" rel="stylesheet" type="text/css" /> <!-- TemplateBeginEditable name="head" --><!-- TemplateEndEditable --> <div id="Container"> <div id="Title"><p><img src="image/frontplane.jpg" style="float:left;margin:5px 10px 5px 5px;" /></p><h1>ADUR AVIATION | LTD</h1> <h2>Consultancy Services to the Aviation Industry</h2> </div> <div id="Wrapper"> <div id="Links"> <p><a href="Aircraft Sales and Lease Negotiations.html" class="Links">Aircraft Sales & Lease Negotiations</a><br /> <span class="Links"><a href="Asset Management and Technical Monitoring.html" class="Links">Asset Management & Technical Monitoring</a></span><br /> <a href="Co Ordination of Aircraft Deliveries.html" class="Links">Co-Ordination Of Aircraft Deliveries</a><br /> <a href="Workpack Preparation.html" class="Links">Workpack Preparation</a><br /> <a href="Storage Programmes.html" class="Links">Storage Programmes</a><br /> <a href="Maintenance Representation.html" class="Links">Maintenance Representation</a><br /> <a href="Aircraft Inspections and Evaluations.html" class="Links">Aircraft Inspections & Evaluations</a><br /> <a href="Project Management.html" class="Links">Project Management</a><br /> <a href="Repossessions.html" class="Links">Repossesions</a><br /> <a href="Contacts.html" class="Links">Contact & Links</a></p> <p> </p> </div> <div id="MainContent"> <p>Adur Aviation Limited (AAL) is an independent Technical Consultancy Service providing a comprehensive service to Airlines, Maintenance Organisations, Leasing Companies and Financial Institutions world wide.</p> <p>Adur Aviations chief technical consultant, Terry Snow, has been providing consultancy services to its clients on a wide range of technical matters and maintains a close, effective and on going relationship with many departments of Airlines, Regulatory Authorities, Aircraft Maintenance Facilities and Overhaul Agencies.</p> <p>Terry Snow is also a member, and past Chairman, of the British Association of Aviation Consultants (BAAC) and has the ability to draw on a wide range of professional aviation consultants allowing Adur Aviation to offer a truly comprehensive service to its clients. </p> </div> </div> </div> </html>
March 4, 200917 yr Hi snowy. There are two things to try. Firstly set the image for the header in the css as you have more control on it's placement and secondly set the top margin and padding of h1 to 0px
March 4, 200917 yr Author Hi snowy. There are two things to try. Firstly set the image for the header in the css as you have more control on it's placement and secondly set the top margin and padding of h1 to 0px cheers i played with the margin for H1 and ended up with a top of 15, which has fixed that problem now just trying to get rid of the white space above the title!
March 4, 200917 yr Author try in the css body { margin: 0px; padding: 0px; } within my layout CSS or as a document style?!
Create an account or sign in to comment