greens85
08-04-2008, 06:43 PM
Hi all,
Im trying to align some text to the top of my image, the problem im having is that it only works on certain resolutions and not others. When it doesnt display correctly it can be anywhere from overlapping the header, to being completely off the screen (obviously, depending on the resolution).
This is the code im currently using:
<div id="content">
<br/>
<img src="Images/spacer.gif" width="1%" height="0" />
<img src="Images/BernardPadFlyers.jpg" alt="Bernard 6 To View Pad Flyers" width="159" height="360" />
<div id="ticketdetails">
<h4>Product Description</h4>
<p></p>
<h4>Product Specification</h4>
<p>The specification for this product is not available.</p>
<h4>Product Price</h4>
<p>If you would like a price on this product, please call us on xxx xxxx xxxx.</p>
<h4>Additional Information</h4>
<p>There is no additional information available for this product.</p>
</div>
</div>
And this is the css for the two div tags (content and ticketdetails):
#content{
background:url(Images/MainBackground.jpg) repeat;
font-family:Verdana, Arial, Helvetica, sans-serif;
background-color:#FFEA94;
width:auto;
height:851px;
padding-top:1%;
padding-left:1%;
padding-right:1%;
}
#ticketdetails{
margin-top:-38%;
margin-left:21%;
}
I should mention that there is no problem with the content div, but the ticket details div is nested inside this so i thought it might be worth mentioning.
Can anyone offer me any advice on how to get this text to align with the top of the picture on every resolution rather than just the one i am developing the website on. I've tried all the positioning such as absolute etc.
Thanks in advance.
Im trying to align some text to the top of my image, the problem im having is that it only works on certain resolutions and not others. When it doesnt display correctly it can be anywhere from overlapping the header, to being completely off the screen (obviously, depending on the resolution).
This is the code im currently using:
<div id="content">
<br/>
<img src="Images/spacer.gif" width="1%" height="0" />
<img src="Images/BernardPadFlyers.jpg" alt="Bernard 6 To View Pad Flyers" width="159" height="360" />
<div id="ticketdetails">
<h4>Product Description</h4>
<p></p>
<h4>Product Specification</h4>
<p>The specification for this product is not available.</p>
<h4>Product Price</h4>
<p>If you would like a price on this product, please call us on xxx xxxx xxxx.</p>
<h4>Additional Information</h4>
<p>There is no additional information available for this product.</p>
</div>
</div>
And this is the css for the two div tags (content and ticketdetails):
#content{
background:url(Images/MainBackground.jpg) repeat;
font-family:Verdana, Arial, Helvetica, sans-serif;
background-color:#FFEA94;
width:auto;
height:851px;
padding-top:1%;
padding-left:1%;
padding-right:1%;
}
#ticketdetails{
margin-top:-38%;
margin-left:21%;
}
I should mention that there is no problem with the content div, but the ticket details div is nested inside this so i thought it might be worth mentioning.
Can anyone offer me any advice on how to get this text to align with the top of the picture on every resolution rather than just the one i am developing the website on. I've tried all the positioning such as absolute etc.
Thanks in advance.