| View previous topic :: View next topic |
| Author |
Message |
Raven12388 250+ Club
Joined: 06 Apr 2008 Posts: 329 Location: Liverpool, England
|
Posted: Sat Apr 12, 2008 1:12 pm Post subject: Help Please |
|
|
Hi all
Ok well my site works fine in IE but looks odd in opera with out a doctype
as soon as i add the doctype it renders oddly in both IE and Opera
here is the code please someone help
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd"><html>
<html>
<head><link rel="stylesheet" type="text/css" href="mystyles.css">
<title>UK Fish Hunt</title>
</head>
<body>
<center>
<div class="Header">
<img src="top.jpg"width="100%"border="0">
</div>
<div class="Container">
<div class="Navigation">
<img src="h1.jpg">
<a href="#"><img src="pl1.jpg"border="0"></a><br>
<img src="h2.jpg">
<a href="#"><img src="os1.jpg"border="0"></a><br>
<a href="#"><img src="os2.jpg"border="0"></a><br>
<a href="#"><img src="os3.jpg"border="0"></a><br>
<a href="#"><img src="os4.jpg"border="0"></a><br>
<a href="#"><img src="os5.jpg"border="0"></a><br>
<a href="#"><img src="os6.jpg"border="0"></a><br>
<a href="#"><img src="os7.jpg"border="0"></a><br>
<a href="#"><img src="os8.jpg"border="0"></a><br>
<a href="#"><img src="os9.jpg"border="0"></a><br>
<img src="h3.jpg">
<a href="#"><img src="os10.jpg"border="0"></a><br>
<a href="#"><img src="os11.jpg"border="0"></a><br>
<a href="#"><img src="os12.jpg"border="0"></a><br>
<a href="#"><img src="os13.jpg"border="0"></a><br>
<a href="#"><img src="os14.jpg"border="0"></a><br>
<a href="#"><img src="os15.jpg"border="0"></a><br>
<a href="#"><img src="os16.jpg"border="0"></a><br>
<img src="h4.jpg">
<a href="#"><img src="pl2.jpg"border="0"></a>
</div>
<div class="Content">
<img src="h5.jpg"border="0"align="top"><br><br><br>
<a href="#"><img
src="me1.jpg"border="0"align"middle"></a><br><br><br>
</div>
<div class="Content">
<img src="h6.jpg"border="0"align="top"><br><br><br>
<a href="#"><img src="bellslane1.jpg"border="0"align"middle"></a><br><br><br>
</div>
<div class="Content">
<img src="h8.jpg"border="0"align="top"><br><br><br>
<a href="#"><img src="phil1.jpg"border="0"align"middle"></a><br><br><br><br>
</div>
</div>
<div class="Footer">
<br>
<img src="bottom.jpg"width="100%">
</div>
</center>
</body>
</html>
and this is the style sheet
DIV.Header
{
background-color:#8cd3d7;
width: 885px;
border: 3px double #003466;
margin: 1px;
padding: 1px;
}
DIV.Container
{
width: 895px;
}
DIV.Navigation
{
text-align:left;
background-image: url(background2.jpg);
width: 185px;
float:left;
border: 3px double #003466;
padding: 2px;
margin: 1px
}
DIV.Content
{
background-image: url(background2.jpg);
width: 688px;
float:right;
border: 3px double #003466;
padding: 1px;
margin: 1px
}
DIV.Footer
{
background-image: url(background2.jpg);
width:885px;
clear:both;
border: 3px double #003466;
margin: 1px;
padding: 1px
}
BODY
{
background-image: url(background1.jpg);background-attachment: fixed;
color:#003265;
font-size:11px;
font-family:Verdana, Arial, Helvetica, sans-serif
}
Thanks
Brian |
|
| Back to top |
|
 |
|
|
Johnathan 500+ Club

Joined: 31 May 2007 Posts: 802 Location: Belfast, Northen Ireland
|
Posted: Sat Apr 12, 2008 1:34 pm Post subject: Re: Help Please |
|
|
| Put the doctype in then goto http://validator.w3.org/ and validate it, and check the box to fix your code then copy into your page and it should render properly in both. |
|
| Back to top |
|
 |
Raven12388 250+ Club
Joined: 06 Apr 2008 Posts: 329 Location: Liverpool, England
|
Posted: Sat Apr 12, 2008 3:02 pm Post subject: Re: Help Please |
|
|
thanks Johnathan
Well i did that and got it working perfect in IE.
Firefox and Opera get it almost perfect apart from a space in them browsers that are not on IE
is it possabe to get it perfect in all browsers using code or is it better to do the whole site as images then just using the coding to house the images??? |
|
| Back to top |
|
 |
Johnathan 500+ Club

Joined: 31 May 2007 Posts: 802 Location: Belfast, Northen Ireland
|
Posted: Sat Apr 12, 2008 3:05 pm Post subject: Re: Help Please |
|
|
| Yea you can get it perfect in all browsers using code, as long as it is fully standard compliant and sometimes you need sort of cheats for certain browsers. |
|
| Back to top |
|
 |
Raven12388 250+ Club
Joined: 06 Apr 2008 Posts: 329 Location: Liverpool, England
|
Posted: Sat Apr 12, 2008 3:21 pm Post subject: Re: Help Please |
|
|
well it all validated after i fixed the erros
on Opera and firefox i have a 20px gap between the navagation div and the footer div but it lines up perfect in IE apart from that it is perfect in all browsers any ideas?? here are images of whats happening
IE browser
Opera and firefox
Thanks
Brian |
|
| Back to top |
|
 |
dflynn 500+ Club

Joined: 03 Oct 2007 Posts: 504 Location: Guelph, Canada
|
Posted: Tue Apr 15, 2008 2:06 am Post subject: Re: Help Please |
|
|
I dunno if youve caught this already but you have 2 html tags at the beginnign of your code.
I don't think that will fix anything but coding is coding.
cheers |
|
| Back to top |
|
 |
rangana 250+ Club

Joined: 27 Feb 2008 Posts: 439 Location: Cebu City Philippines
|
Posted: Tue Apr 15, 2008 2:12 am Post subject: Re: Help Please |
|
|
Yes well spotted dflynn
@Raven12388,
Fix how you call your images, give them spaces:
| Code: |
<img src="os1.jpg"border="0">
|
...Also, add img{display:block;} in your CSS might help. For further reading:
http://developer.mozilla.org/en/docs/Images,_Tables,_and_Mysterious_Gaps
Center are among the deprecated attributes, but as what Jonathan suggested,,,and yet you had already fix the validation errors
...Also, if nothing still works, show us the validated code...or better a link  |
|
| Back to top |
|
 |
Raven12388 250+ Club
Joined: 06 Apr 2008 Posts: 329 Location: Liverpool, England
|
Posted: Tue Apr 15, 2008 4:29 pm Post subject: Re: Help Please |
|
|
| Thanks Guys all fixed much apreciated |
|
| Back to top |
|
 |
|