Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Layout HELP!

Featured Replies

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 :drinks:

 

screen shot of problem

 

post-2177-1236193289_thumb.png

 

 

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>

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

  • 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!

  • 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

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.