This forum is in permanent archive mode. Our new active community can be found here.

Web Project Help

I'm doing a project for school and I'm having trouble getting to to look the same in IE 6 & 7, Firefox 2, and Safari.

One big problem is the alignment, it looks centered in IE 7 & 6, and Safari, but it is not the same for Firefox.
Firefox Problem, It's suppose to be centered;
image

sorry no IE 6 image. >_<

One other problem that I'm having, is that the top Image background color in safari doesn't match, I used the same hex color and safari doesn't like it. So I went into photoshop and made the background transparent and saved it as a PNG-24. Then I changed the code to the new image and it worked for all the browsers, but IE 6 that my school is using doesn't like it and instead ignores the background transparency.
Safari and IE 6 problem:
image



This project is a client website for a mom and pop cabin in northern wisconsin. It's just a simple web site with some HTML and CSS.
I just want to say that I'm not the best web coder and my HTML style may not be the best. So ignore the anything that is a minor problem.
I would greatly appreciate any help from you web coding masters.

Make corrections in red please:
So here is the code:

<html>
<head>
<title>Lakewood Resort - Tomahawk,WI</title>
<link href="lakewoodstyle.css" rel="stylesheet" type="text/css">
</head>
<!---This page is developed and best view at 800x600 ratio---->

<Body bgcolor="#845322" align="center" valign="top">

<!---this is the master table--->
<Table Width="700px" align="Center" valign="top" col="1" border="0px" class="mtable" cellspacing="0px">

<TR valign="Top" align="Center" width="700px" height="235px">
<IMG Width="700px" SRC="Main1top.jpg" Border="0px"><br>

<!--<TR valign="Top" align="Center" width="700px" height="46px">-->
<IMG SRC="navigation bar.jpg" USEMAP="#navbar" border="0px">

<MAP NAME="navbar">
<!--Home Page-->
<AREA SHAPE="rectangle" COORDS="0,0,97,46" HREF="Lakewood Homepage.html">

<!--About-->
<AREA SHAPE="rectangle" COORDS="97,0,253,46" HREF="About.html">

<!--Photo gallery-->
<AREA SHAPE="rectangle" COORDS="253,0,366,46" HREF="Photo.html">


<!--Infomation-->
<AREA SHAPE="rectangle" COORDS="366,0,440,46" HREF="Info.html">


<!--Activites-->
<AREA SHAPE="rectangle" COORDS="440,0,577,46" HREF="Activites.html">


<!--Contact-->
<AREA SHAPE="rectangle" COORDS="577,0,699,46" HREF="Contact.html">
</map>

</TR>
<TR>
<Table align="Center" Width="650px" border="0px" class="nTable1">
<TD Width="650px" align="Center">
<P valign="top" align="left" Class="custfnt2">Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
<Font Class="custfnt3">Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.
Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat.
Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi. Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat.
Lorem ipsum dolor sit amet, consectetuer adipiscing elit, sed diam nonummy nibh euismod tincidunt ut laoreet dolore magna aliquam erat volutpat. Ut wisi enim ad minim veniam, quis nostrud exerci tation ullamcorper suscipit lobortis nisl ut aliquip ex ea commodo consequat. Duis autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et accumsan et iusto odio dignissim qui blandit praesent luptatum zzril delenit augue duis dolore te feugait nulla facilisi.</P></TD>
</Table>
</TR>
</Table>
</Body>
</html>


And here is the CSS sheet:
/*Master and Slave Tables Style Rules*/
.mtable {
text-align: center or inherit
}

}
.subtable {
background-color: #cc6600;
}

.nTable1 {
Background-color: #e9d9b1;
Text-align: center or inherit;
Vertical-align: Top;

}

/*Custom Color Style Rules*/
.custclr {
background-color: black;

}

/* Font Style Rules */
.custfnt1{
font-size: 36px;
color: #000000;
font-family: tahoma;
text-align: center;


}
.custfnt2{
font-size: 22px;
color: #000000;
font-family: tahoma;
text-align: center or inherit;
}
.custfnt3{
font-size: 16px;
color: #000000;
font-family: tahoma;
text-align: left or inherit;
}
.custfnt4 {
font-size: 12px;
color: #000000;
font-family: tahoma;
text-align: left or inherit;
}

/* Link pseudo-class style rules */
a:link {
color: #660000;
}
a:visited {
color: #990000;
}
a:hover {
color: #000000;
}
a:active {
color: #FF0000;
}
«1

Comments

  • If it's a project for school just adjust it so that it looks right in the browser your teacher is going to be viewing it through. No use in doing extra work if you don't have to.
  • If you really want it to look good everywhere I would cut the background from the photo-image and re-save it as a .gif with transparent background.
  • If it's a project for school just adjust it so that it looks right in the browser your teacher is going to be viewing it through. No use in doing extra work if you don't have to.
    Yeah, But like I said,
    This project is a client website for a mom and pop cabin in northern wisconsin.
    This site is going live on the internet. So that is not an option.
  • If you really want it to look good everywhere I would cut the background from the photo-image and re-save it as a .gif with transparent background.
    Tried that, .gif doesn't support drop shadows and the color pallet is limited.
  • ......
    edited June 2008
    <body bgcolor="#845322" align="center" valign="top">
    <!---this is the master table--->
    <table width="700px" align="Center" valign="top" col="1" border="0px" class="mtable" cellspacing="0px">
    </table></body>
    First off, why are you capitalizing the tags? Besides it being wrong it's a very unusual thing to do. Before the xhtml spec people used either all lowercase or all uppercase, the argument for uppercase was that the tags are easier to spot, as for lowercase, that's the standard (at least these days with xhtml), secondly,
    DON'T USE TABLES FOR LAYOUT.
    Firefox 2 not displaying your stuff as you expect it to do means you are doing it wrong. If it works in IE6, wooptidoo, that browser hates standards, as does IE7, only to a lesser extent. Safari has something with color profiles, I don't remember exactly what it was anymore, but it's the reason why your image(s) looks wrong, it probably means Safari's default color profile is the culprit there.

    Image maps??? Why not just cut the image into seperate buttons if you're going to use it for that? I've never seen the use in image maps, they are obsolete.
    <!---This page is developed and best view at 800x600 ratio - - -->
    Yeah, bullshit, you're not developing it for an 800x600 aspect ratio, you're developing a site where the recommended minimum screen _resolution_ is 800 by 600 pixels. And even then you only care about the width.

    Lessee, what else is there to nitpick quickly... meh, not much, please learn some proper html and for fucks sake, cut off the Lorem Ipsum crap, "Lorem Ipsum dolor sit amet..." is ENOUGH, delete the rest of that text in that code block, it only fucks up the site.

    Good luck learning html.

    EDIT: What was that website philosophy again? Content in the .html file, styling in the .css file. Have you ever turned css off on some sites? Have you seen that they look like crap then? Lay-out wise? That's because there's only content on those pages if you turn the css off. How did you get that job in the first place?
    Post edited by ... on
  • How did you get that job in the first place?
    It's a project that i'm doing in my web design class, and for the final project we could ether do a maze with CSS and Javascript or a client website for a local company.

    As for Image Map, it was only temporay, now it's gone. As For tables, Tough shit, the project is due in 3 days I i don't have time tho learn
    tags.
    Secondly, I capitalize tags because it's an old habit from my HTML and Visual Basic days.
    ust want to say that I'm not the best web coder and my HTML style may not be the best. So ignore the anything that is a minor problem.

    good reading...lol


    Although thanks for some advice, I wish some would help me fix the problem not criticize me.
  • UPDATE:

    Hooray!!!
    I'm In 3rd Beta ^_^

    I'll worry about alignment and sizing issues later.

    Much more to do, Now I have to do make a photo gallery, a contact page with a email form, and possibly a reservation calender.

    Heres (raising Monster energy drink) to more coding and head bashing. ^_< !
  • ......
    edited June 2008
    ust want to say that I'm not the best web coder and my HTML style may not be the best. So ignore the anything that is a minor problem.
    good reading...lol
    Sorry for skimming, either way, you have to be called on it. If you want to make a website for a company you should follow standards. The company wants their website to work in as many browser as possible so that their clients can use whatever they want to browse the site, hence standards.
    As for Image Map, it was only temporay, now it's gone.
    What the hell? It's harder to get the correct coördinates for an image map than to just directly make links with images out of them.
    As For tables, Tough shit, the project is due in 3 days I i don't have time tho learn
    You should already know the alternative! If you don't, you haven't learned a darned thing. Hell, it doesn't take any time to 'learn' the solution. And 3 days is ample time for that little work you have to do.
    Secondly, I capitalize tags because it's an old habit from my HTML and Visual Basic days.
    I don't care about your old habits, browsers don't care about your old habits, nobody cares about your old habits, you should be using lowercase. And what the hell? "an old habit from my HTML ... days."!? Excuse me while I laugh my ass off.
    Although thanks for some advice, I wish some would help me fix the problem not criticize me.
    DON'T USE TABLES FOR LAYOUT.
    :HEADDESK: That is your solution! Don't use tables. And why shouldn't someone criticize the stuff you're trying to shove down our throats in a desperate attempt to get someone else to do your little work for you? You have to be strict, precise, computers can't work with crap.

    Also, I thought I had skimmed over it... but where the hell is your DOCTYPE? If you say anything along the lines of "What's a DOCTYPE?" then you seriously need to resign from the class for you haven't learned a thing, and if it wasn't taught in the class, you've wasted your time and money.

    Hmmm, caricature idea...

    EDIT:
    Hooray!!!
    I'm In 3rd Beta ^_^
    10. :HEADDESK:
    20. GOTO 10

    Version numbering? On a single and simple project website!? And the edit button is a feature only given to those who are awesome yes.
    Post edited by ... on
  • As a disclaimer: I'm going to try to help you out here, but don't assume for a second you're going to get out of it without a load of learning and reading. Don't assume I'm going to red-pen this project, as it would basically mean writing it for you. ;)

    For all that Myself was perhaps a bit harsh in his response, he's absolutely correct: your layout issues come from a combination of the way you are using your tables, lack of doctype, an improper blending of techniques and at times malformed code.

    Your tables are a mess. Your 'master' table never declares a 'td' inside of the 'tr's. Your sub-table never declares a 'tr' for the 'td'. Remember, tables always need that kind of 'table->tr->td' structure. Some browsers will fill in the blanks for you; others won't. If they do, it might not be in the same way, so make sure to fully mark up these kinds of things.

    Also, I'm not sure why you bothered to set up that sub-table, and I'm certain it's causing most of your headaches. It would do you well to get rid of it.

    Note: I agree with Myself in saying tables should never have been used here in the first place.

    Using a valid doctype is critical when attempting to make pages render properly across browsers. Browsers essentially have two ways to render pages: the right way, and a way that is wrong in predictable ways. These are generally referred to as 'strict mode' and 'quirks mode' respectively. An excellent write-up on the situation can be found here. Assigning the document a doctype will flip the browser from 'quirks' to 'standard' mode and make your life significantly easier.

    The 'blended techniques' stems from the fact that you're using CSS along-side deprecated HTML attributes. Do not define things like widths, heights and borders in the attributes; do it in CSS. You will probably have to familiarize yourself with CSS selectors to do this properly, but it will save you plenty of trouble when fighting layout issues.

    As for the malformed code:
    - The CSS 'text-align' property does not allow for the use of that 'or' keyword you're using. It's probably making the whole declaration get dropped. You shouldn't be using it to align page elements, anyways; you should be using margin: auto on your 'master' table.
    - The body tag does not use either the valign property or the align property.

    Hope this has helped!
  • THANK YOU SOOOOO MUCH!, Unfortunately for me I had to stop working an hour after my last post, due to tornado warnings and geting a 1/4 inch of water in the basement. So doing any work was, well impossible.

    I know I should be using standards like the
    tag and better CSS, but in my class we were rushed so much that we didn't spend much time on those and instead spent more time on Javascript, Which I know very litttle of thanks to the fact that we only had like 3 days to do like a week and a half work of work so, I didn't get to do lesson problems in the book. So pretty much I learned nothing. >_<

    Thanks for the Help any way.
  • I've re-factored (rewritten/fixed) the code you've given to us (without the crappy miles of Lorem ipsum), including the center fix and 'hack' that konistherad linked. My guess is that my version is about half in length, not counting the image map and multiple lines of Lorem ipsum, compared to yours, that includes the CSS. It's not that hard, it took me longer to write this post than it took to write the code (don't be shocked, I take a ungodly amount of time writing a post as simple and short as this, and I was thinking about putting the code in a collapsed table, but nah, I'm not that nice). Anyways, a little tip, see those 4 custom font classes you have defined? You give them different sizes and appear to be using them as header formatting. Why not use the official header tags for that then? (the h1, h2, etc, tags) That way your webpage will still have some sort of headers as you intended if the client browser has CSS turned off.

    And if you want to write a tag outside of the <code> tag use &lt; as opening 'tag' and &gt; as closing 'tag'. It took me some time to realize that you were typing "I know I should be using standards like the <div> tag and better CSS...". Baka, it's not like there's much to the <div> tag.
  • edited June 2008
    Well, thanks for the help anyway. Long story short, The project ended up not needing to be turned in. There was a minor electrical fire in the building which interrupted all the 5th hour exams, The time when the client was suppose to come in and check the site for the final version. Yet, with the entire school evacuated and no electricity, it was kinda hard to turn in the project and the client was able to reschedule on such short notice. But, my partner and I will have to finish it for her in the near future outside of school and we'll most likely get some $$.

    Thanks again. For your help.
    FRCF is like one big happy family. ^_^
    Post edited by CHOIS CHOIS CHOIS on
  • I thinking of doing some basic freelance web design for the summer. I'm just gonna make basic sites for small companies. few pages, A little CSS. and Bam a nice site and a full wallet.
  • ......
    edited June 2008
    A little CSS.
    Not a little, A LOT. Good luck with your ideal, my tip, learn to actually use div's, the proper tags, classes and ID's.

    EDIT: Also, some information, your banner that looks wrong in Safari. It also looks wrong in Firefox 3 now if the user has turned on color profiles. From what I gathered you can fix that problem by saving the image with an sRGB color profile. All colors you define in CSS are in the sRGB color profile, so if you safe your images in that color profile it should probably look correct. If not, then my assumption was wrong.

    EDIT5orso: Another idea to fix that banner problem, define the png version in your standard CSS and use a conditional comment to load special IE6 only CSS which uses the non-png version.
    Post edited by ... on
  • I thinking of doing some basic freelance web design for the summer.
    I mean no offense, Morio, but you should consider putting a little more experience under your belt before starting freelance work, preferably under the wing of someone skilled. I'm saying this as a freelance web-dev who has had to teach himself a lot of what he knows on the fly to keep up. I could certainly link you to a lot of good resources, but ultimately it's going to require a huge time commitment from you to learn the technologies and how to properly use them.
  • edited June 2008
    I would recommend looking into depreciated tags and make sure your pages validate. Right now it may seem like a waste of time but in the future it will help you a lot with future projects where they require you to do so.

    Also don't use capitals make sure your code is in all lower case to keep it rendering properly.


    Also I recomend if you have the time to play around with using XHTML.

    <!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" xml:lang="en" lang="en">
    <head>
    <title></title>
    <link href="lakewoodstyle.css" rel="stylesheet" type="text/css">
    </head>
    <body>
    </body>
    </html>



    Also check out:
    http://www.html-reference.com/depreciated.htm
    http://validator.w3.org/
    Post edited by Alan on
  • I meant, very basic. Like for my friend's Dad, painting businesses.
  • edited June 2008
    opps, double posted.
    Post edited by CHOIS CHOIS CHOIS on
  • I meant, very basic. Like for my friend's Dad, painting businesses.
    It doesn't matter how small the business is, you still need to make content that can be displayed by anyone and everyone. Let's say someone is trying to view the site on a cellphone. Now, cellphone web browsers are coded to be small and lightweight. They need your code to validate, because they don't have the spare processor cycles or RAM to clean your code up for you. You friend's dad isn't going to want a site that devolves into garbage when someone tries to open it with a Blackberry or a minimalist browser (say, the browser built into the PS3).

    This is just one reason why you need clean, proper code. Take a look at a template that I'm working on for a competition I volunteer for. Take note that this too is a work in progress, and the code still needs a LOT of cleaning. However, it validates, and any coder who comes after me will have an easier time modifying or updating the page than they would with your tables.

    The HTML
    The CSS

    p.s. Also note that the images are PNGs like yours, but by stripping the color profile information out of the PNG itself, my images don't have the off-color background problem with IE and Safari.
  • The HTML
    AAAAAAAARGH! So many divs! Then again, what do you expect, round corners. Unordered Lists for menus, good, however you switched up the tags. <ul> tags should surrounds <li> tags. Ul stands for Unordered List, and li stands for List Item. I.e. you put items in a list. Not lists in an item.
  • Why do you guys spend so much time learning to hard code HTML when you should be learning to new hotness of Ruby on Rails or Django?
  • edited June 2008
    Its good to get start learning from the ground up. How can you learn the advanced concepts of something else when you don't know the basic building blocks 100%.
    Post edited by Alan on
  • AAAAAAAARGH! So many divs! Then again, what do you expect, round corners.
    Yeah, I hate all the markup you need to round out the corners, but they're too nice not to. Do you have any suggestions on how to somehow set those divs in a separate file and include them at presentation time without using PHP or AJAX? I was wondering if the W3C recommendation had some arcane way of either rolling multiple background images into one div, or somehow condensing those divs down to minimize the amount of code I have to include with my content. If I can't find anything, I'll just build a 'reader' page using XmlHttpRequest.
    Unordered Lists for menus, good, however you switched up the tags.
    Gah, I was wondering why I was having trouble getting them to behave properly, I never even realized my slip-up. Thanks!
  • Why do you guys spend so much time learning to hard code HTML when you should be learning to new hotness of Ruby on Rails or Django?
    Even with a Rails or Django install you have to configure your views, which is done in HTML+CSS. It's not like using a scaffolded framework prevents you from knowing it, in any professional capacity, anyways.
  • edited June 2008
    Even with a Rails or Django install you have to configure your views, which is done in HTML+CSS. It's not like using a scaffolded framework prevents you from knowing it, in any professional capacity, anyways.
    In django, the views are Python functions, the templates are HTML and CSS.
    Post edited by Apreche on
  • In django, the views are Python functions, the templates are HTML and CSS.
    Same idea. At some where along the line, in order to move past the stock templates, you've gotta go in there and get your hands dirty.

    I will say, I'm becoming more and more curious about this django guy. CakePHP left me with a pretty bad taste in my mouth, and Rails always seemed like a glorified gimmick. Guess I'll have to find myself a python CGI module one of these days ...
  • In django, the views are Python functions, the templates are HTML and CSS.
    Same idea. At some where along the line, in order to move past the stock templates, you've gotta go in there and get your hands dirty.

    I will say, I'm becoming more and more curious about this django guy. CakePHP left me with a pretty bad taste in my mouth, and Rails always seemed like a glorified gimmick. Guess I'll have to find myself a python CGI module one of these days ...
    http://www.djangobook.com/. Also, CGI bad. Don't do that.
  • edited June 2008
    ARG, I'm still new at this! I'm just a beginer and it's already a pain in the ass to get my site to work for all browsers as it is. I don't need to be learning Ruby train tracks and dingo dog languge, I just want the site to look right on all screens and browsers.
    Well, thanks for the help anyway. Long story short, The project ended up not needing to be turned in. There was a minor electrical fire in the building which interrupted all the 5th hour exams, The time when the client was suppose to come in and check the site for the final version. Yet, with the entire school evacuated and no electricity, it was kinda hard to turn in the project and the client was able to reschedule on such short notice.
    Besides schools out and project is over, I'm just worrying about my DDR and Personal site and maybe a job this summer.
    Post edited by CHOIS CHOIS CHOIS on
  • edited June 2008
    Also, CGI bad. Don't do that.
    Truth be told, I just wrote that to signify: "whatever module I happen to need wherever." You're absolutely right, tho. My bad. :x
    Post edited by konistehrad on
  • Also, CGI bad. Don't do that.
    Truth be told, I just wrote that to signify: "whatever module I happen to need wherever." You're absolutely right, tho. My bad. :x
    Just call me the stickler.

    So you know, when you work with django, it has its own development web server that you use. Once you are ready to deploy, you generally use apache+mod_python. However, you can do it with fastcgi, but it sucks.
Sign In or Register to comment.