HTML Tutorial


 Forum HomeForum Home   FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
RegisterRegister - Not registered yet? Got something to say? Join HTML Code Tutorial!
website layout not the same in both firefox and IE
Post new topic   Reply to topic    HTML Help Forum Index -> CSS
View previous topic :: View next topic  
Author Message
smjack



Joined: 16 Mar 2008
Posts: 7

PostPosted: Fri Apr 18, 2008 6:42 am     website layout not the same in both firefox and IE Reply with quote

Hello,

I just learned CSS so I am very new at this! I created this site using my MAC and testing it in Firefox. I did everything in text edit, so it is purely code. Once I was done, I validated the HTML using that W3 validator website and it found a few errors. I used the "tidy" code it gave me, tested it again and it said it passed, and found no errors......I also validated the CSS and it passed with no errors.

But when i view the site on IE the layout is messed up. Mainly the logo which appears on the bottom of the page, on top of the footer, is hidden by the footer (not sure why) and the disclaimer text at the bottom is overflowing outside the footer DIV.

Additionally, when you roll over the menu items on the top, it moves the whole menu around. I would greatly appreciate any advice or help anyone can give me. Thank you!

[code]<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="eng" xml:lang="eng">
<head>
<meta name="generator" content="HTML Tidy for Linux (vers 1 September 2005), see www.w3.org" />
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Our Practices - Family Law - Criminal Defense - Civil Litigation</title>

<style type="text/css">
/*<![CDATA[*/

body {
width: 850px;
margin: 0; padding: 0;
font: small verdana, sans-serif;
}

a{
text-decoration: none;
}

a img {
border:0;
}

p {
margin: 0 0 1em;
}

#maincontainer {
margin: 25px;
width: 850px;
}

#topsection {
background: url(media/pinkbgover.gif);
padding-top: 20px;
height: 50px;
width: 100%;
}

#menu a {
color: #660000;
}

#menu {
margin: 0 11% 0 11%;
float: left;
margin-top: .25em;
}

#submenu {
margin-left: 15em;
padding-top: 1em;
margin-top: .5em;
}

#submenu li {
font-size: .8em;

}

#menu li {
display: inline;
margin-right: 0.5em; padding-right: 0.75em;
margin-top: 20px;
border-right: 1px solid #660000;
text-decoration: none;
letter-spacing: 0.1em;

}

#menu li a:hover{
color: red;
font-style: italic;
}

#menu li.last {
border-right:0;
}

#maincontent {
height: 350px;
width: 100%;
padding-top: 15px;
padding-bottom: 45px;
}

#maincontent a {
color: #660000;
text-decoration: underline;
}

#text {
color: #660000;
font-size: 1em;
text-align: justify;
letter-spacing: 0.05em;
float: right;
padding-right: 5px;
padding-left: 25px;
margin-right: 65px;
width: 500px;
margin-top: 40px;
overflow: auto;
height: 300px;
}


#image {
float: right;
width: 200px;
padding-top: 40px;
}

#logo {
font-family: garamound, georgia, serif;
font-variant: small-caps;
font-size: 3em;
text-align: center;
color: #660000;
margin-bottom: 0px;
height: 50px;
}

#footer {
background: url(media/pinkbgfooter.gif);
width: 100%; height: 70px;
padding-bottom: 20px;
margin-top: -40px;
}

#footer h1 {
color: #660000;
text-align: center;
letter-spacing: .5em;
font-size: 11px;
font-weight: normal;
padding-top: 30px;
}

#footer p {
color: #660000;
text-align: justify;
font-size: .75em;
margin: 10px 10px 0 10px
}


/*]]>*/
</style>
</head>


Last edited by smjack on Tue Apr 22, 2008 3:32 pm; edited 2 times in total
quartzy



Joined: 26 Dec 2007
Posts: 405

PostPosted: Sun Apr 20, 2008 5:54 pm     re Reply with quote

I am not very experienced in CSS myself, but I dont think you're divs match up. A tip is to place a comment on each end div for what is ends for.
Like <div id="footer">
Text
</div>--->for footer.
You may find that by doing this youre divs will be corrected.
Straystudio



Joined: 14 Apr 2008
Posts: 261
Location: Nord Italy

PostPosted: Sun Apr 20, 2008 9:10 pm     Reply with quote

I have seen nothing, still; tray changing declaration:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

into:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


Let Us know ...
smjack



Joined: 16 Mar 2008
Posts: 7

PostPosted: Mon Apr 21, 2008 1:52 pm     Re: re Reply with quote

quartzy wrote:
I am not very experienced in CSS myself, but I dont think you're divs match up. A tip is to place a comment on each end div for what is ends for.
Like <div id="footer">
Text
</div>--->for footer.
You may find that by doing this youre divs will be corrected.


thanks for the tip! That is a good idea to keep track of the divs. I had a bit of trouble while I was creating this site.

I took your advice, and did this....but I didnt see any divs left open or anything. It all seems to be in place.....
smjack



Joined: 16 Mar 2008
Posts: 7

PostPosted: Mon Apr 21, 2008 2:01 pm     Reply with quote

Straystudio wrote:
I have seen nothing, still; tray changing declaration:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

into:

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">


Let Us know ...



Thank you for replying. I tried doing that, but it doesn't seem to help either. It actually made it worse......I am baffled. I have searched through this forum and have found similar posts, but all of the other solutions that other people have gotten, have not worked for me. There has to be something wrong. I have even checked on many other computers, and it all looks the same.....the design is correct in firefox, and off in IE.

Here is the address to the site if it helps at all to see it:

www.sarahtricano.com/csstest/about.html

I am uploading it now.......

Thanks again for trying to help!
quartzy



Joined: 26 Dec 2007
Posts: 405

PostPosted: Mon Apr 21, 2008 2:12 pm     re Reply with quote

Had a look at your site and whilst this will not help you, is it right to have two <style type=text/css></style> on one page? Which is what you have, try removing one of them see if it helps.
smjack



Joined: 16 Mar 2008
Posts: 7

PostPosted: Mon Apr 21, 2008 2:19 pm     Re: re Reply with quote

quartzy wrote:
Had a look at your site and whilst this will not help you, is it right to have two <style type=text/css></style> on one page? Which is what you have, try removing one of them see if it helps.


Thanks again- im not sure what that was, but I removed it and still no luck.
sticks464



Joined: 31 Dec 2006
Posts: 1179

PostPosted: Mon Apr 21, 2008 9:48 pm     Reply with quote

This should work for you in IE7 and FF. It will need more work for Opera, Safari and IE6.
Code:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>The Tricano Law Office: About Us</title>
<style type="text/css">
body {
        width: 850px;
        margin: 0; padding: 0;
        font: small verdana, sans-serif;
}

a{
        text-decoration: none;
}

a img {
        border:0;
}

p {
        margin: 0 0 1em;
}

#maincontainer {
        margin: 25px;
        width: 850px;
}

#topsection {
        background: url(media/pinkbgover.gif);
        padding-top: 20px;
        height: 50px;
        width: 100%;
}

#menu {
      list-style:none;
      margin:0;
      float:left;
      width:772px;
      text-align:center;
      font-size:1.1em;
}

#menu li {
      display:inline;
      border-right:1px solid #660000;
      padding-right:0.5em;
      margin-right:0.5em;
      letter-spacing: 0.1em;
}

#menu a {
      color: #660000;
      text-decoration:none;
}

#menu a:hover {
      font-style: italic;
}

#menu li.last {
      border:0;
}

#maincontent {
        height: 350px;
        width: 100%;
        padding-top: 15px;
        padding-bottom: 45px;
}

#maincontent a {
        color: #660000;
        text-decoration: underline;
}

#text {
        color: #660000;
        font-size: 1em;
        text-align: justify;
        letter-spacing: 0.05em;
        float: right;
        padding-right: 5px;
        padding-left: 25px;
        margin-right: 100px;
        width: 500px;
        margin-top: 40px;
        overflow: auto;
        height: 300px;
}


.headshot {
        float: left;
        width: 200px;
        padding-top: 40px;
}

#logo {
        text-align: center;
        margin-bottom: 0px;
        height: 55px;
}

#footer {
        background:#ffcc99 url(media/pinkbgfooter.gif);
        width: 100%;
      height: 70px;
        padding-bottom: 25px;
        margin-top: -10px;
}

#footer h1 {
        color: #660000;
        text-align: center;
        letter-spacing: .5em;
        font-size: 11px;
        font-weight: normal;
        padding-top: 30px;
}

#footer p {
        color: #660000;
        text-align: justify;
        font-size: .75em;
        margin: 10px 10px 0 10px
}
</style>


Last edited by sticks464 on Tue Apr 22, 2008 2:41 pm; edited 1 time in total
sticks464



Joined: 31 Dec 2006
Posts: 1179

PostPosted: Tue Apr 22, 2008 7:52 am     Reply with quote

This will work in all modern browsers, however IE5.5 and 6 do not like the logo png. You might consider changing it to a jpg.
Code:

<!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">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>The Tricano Law Office: About Us</title>
<style type="text/css">
* {
padding:0;
margin:0;
}
body {
font: small "Verdana", Arial, Helvetica, sans-serif;
color:#000;
margin: 25px;
}
#maincontainer {
width: 850px;
text-align:left;
}
#topsection {
background: url(media/pinkbgover.gif) repeat-x;
padding-top: 20px;
height: 70px;
}
#menu {
list-style:none;
margin:0;
float:left;
width:850px;
text-align:center;
font-size:1.1em;
}
#menu li {
display:inline;
border-right:1px solid #660000;
padding-right:0.5em;
margin-right:0.5em;
letter-spacing: 0.1em;
}
#menu a {
color: #660000;
text-decoration:none;
}
#menu a:hover {
font-style: italic;
}
#menu li.last {
border:0;
}
#maincontent {
/*height: 350px;*/
padding-top: 15px;
}
#image {
float:left;
width:200px;
margin-bottom:40px;
}
#text {
float:left;
width:620px;
margin-left:25px;
text-align:justify;
}
#text p {
margin-bottom:10px;
}
#text .big {
font-weight:bold;
margin-bottom:0;
}
#text ul {
margin-left:20px;
}
#text a {
color: #660000;
text-decoration: underline;
}
#logo {
background:url(media/small_logo.png) no-repeat center center;
height: 55px;
margin-top:10px;
}
#footer {
background:#ffcc99 url(media/pinkbgfooter.gif) repeat-x top left;
height:65px;
padding-top: 30px;
}
#footer h1 {
color: #660000;
text-align: center;
letter-spacing: .5em;
font-size: 11px;
font-weight: normal;
}
#footer p {
color: #660000;
text-align: justify;
font-size: .75em;
margin: 10px 10px 0 10px
}
</style>


Last edited by sticks464 on Tue Apr 22, 2008 2:40 pm; edited 1 time in total
smjack



Joined: 16 Mar 2008
Posts: 7

PostPosted: Tue Apr 22, 2008 9:45 am     Reply with quote

Sticks- thank you so much for your reply and time. Initially, both codes work great in both. However, I need the logo on the bottom to be right on top of the footer. When I change the CSS to do this, the logo is once again hidden by white space from the footer and the text is not in alignment. I have attached some screen shots to show you what I would like it to look like, and what it looks like to me in IE.



sticks464



Joined: 31 Dec 2006
Posts: 1179

PostPosted: Tue Apr 22, 2008 11:59 am     Reply with quote

Initally what the cause in IE for the logo to be hidden was the negative margin on the footer. Ok, change these in the css
Code:

#footer {
background:#ffcc99 url(media/pinkbgfooter.gif) repeat-x bottom left;
height:60px;
}
#footer .address {
color: #660000;
text-align: center;
letter-spacing: .5em;
font-size: 11px;
padding:0;
}
#footer p {
color: #660000;
text-align: justify;
font-size: .75em;
margin: 0 10px 5px 10px
}
smjack



Joined: 16 Mar 2008
Posts: 7

PostPosted: Tue Apr 22, 2008 1:49 pm     Reply with quote

sticks464 wrote:
Initally what the cause in IE for the logo to be hidden was the negative margin on the footer. Ok, change these in the css
Code:

#footer {
background:#ffcc99 url(media/pinkbgfooter.gif) repeat-x bottom left;
height:60px;
}
#footer .address {
color: #660000;
text-align: center;
letter-spacing: .5em;
font-size: 11px;
padding:0;
}
#footer p {
color: #660000;
text-align: justify;
font-size: .75em;
margin: 0 10px 5px 10px
}


Thanks once again for your help! I will have to try that out a little later when i get home from work. I appreciate your time.

I just have one favor to ask. I just noticed that this forum is coming up at the top of a google search for the website. would you mind editing your post and removing the body text in the code-i think this is what google is hitting on. I dont want to disturb the "googlness" of the website itself.

Again, thank you for your help.
Display posts from previous:   
Post new topic   Reply to topic    HTML Help Forum Index -> CSS All times are GMT - 8 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
HTML Help Archive
Powered by phpBB © 2001, 2005 phpBB Group
HTML Help topic RSS feed 

 
HOSTING / DESIGN
MAKE MONEY

Home
  |   Tutorials   |   Forum   |   Quick List   |   Link Directory   |   About
Copyright ©1997-2002 Idocs and ©2002-2007 HTML Code Tutorial