Help - Search - Members - Calendar
Full Version: Help With Firefox
Zymic Webmaster Forums > Web Design & Development > Client Side Scripting > HTML and CSS
jimbobd
Hi everyone. I have recently made my first web template and throughout I have tested it in internet explorer. However now that it is finished, i have tested in firefox to find that it doesn't work, whatsoever. Is it alright to post the full page code here? I don't want anyone to copy my work
Jack
Yes you can show us your code / URL, if you don't then we can't help.
NaRzY
Post your code in [html] (also include your CSS if you are using that) tags and then your URL so we can have a look at the problem.

Jacob.
jimbobd
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></title>
<!--<link href="free stuff.css" rel="stylesheet" type="text/css" />-->
<style type="text/css">
@charset "utf-8";
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #666666;
margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
color: #000000;
}
/* ---------------------- Dolphin nav ---------------------- */
#dolphincontainer{position:relative;height:56px;color:#E0E0E0;background:#C25E02
;width:100%;font-family:Helvetica,Arial,Verdana,sans-serif;}
#dolphinnav{position:relative;height:33px;font-size:12px;text-transform:uppercase;font-weight:bold;background:#f15903 url(images/dolphin_bg copy.gif) repeat-x bottom left;padding:0 0 0 20px;}
#dolphinnav ul{margin:0;padding:0;list-style-type:none;width:auto;float:left;}
#dolphinnav ul li{display:block;float:left;margin:0 1px;}
#dolphinnav ul li a{display:block;float:left;color:#EAF3F8;text-decoration:none;padding:0 0 0 20px;height:33px;}
#dolphinnav ul li a span{padding:12px 20px 0 0;height:21px;float:left;}
#dolphinnav ul li a:hover{color:#fff;background:transparent url(images/dolphin_bg-OVER copy.gif) repeat-x bottom left;}
#dolphinnav ul li a:hover span{display:block;width:auto;cursor:pointer;}
#dolphinnav ul li a.current,#dolphinnav ul li a.current:hover{color:#fff;background:#1D6893 url(images/dolphin_left-ON copy 2.gif) no-repeat top left;line-height:275%;}
#dolphinnav ul li a.current span{display:block;padding:0 20px 0 0;width:auto;background:#1D6893 url(images/dolphin_right-ON copy 2.gif) no-repeat top right;height:33px;}
/* ---------------------- END Dolphin nav ---------------------- */
.thrColLiqHdr #container {
width: 100%; /* this will create a container 100% of the browser width */
background: #FFFFFF;
margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
border: 1px solid #000000;
text-align: left; /* this overrides the text-align: center on the body element. */
}
.thrColLiqHdr #header {
background: url(images/header bg.gif);
background-repeat:repeat-x;
height: 110px;
padding: 0 px; /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
}
.thrColLiqHdr #header h1 {
margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
}

/* Tips for sidebars:
1. Since we are working in percentages, it's best not to use side padding on the sidebars. It will be added to the width for standards compliant browsers creating an unknown actual width.
2. Space between the side of the div and the elements within it can be created by placing a left and right margin on those elements as seen in the ".thrColLiqHdr #sidebar1 p" rule.
3. Since Explorer calculates widths after the parent element is rendered, you may occasionally run into unexplained bugs with percentage-based columns. If you need more predictable results, you may choose to change to pixel sized columns.
*/
.thrColLiqHdr #sidebar1 {
background: url(images/sides.gif);
float: left; /* this element must precede in the source order any element you would like it be positioned next to */
width: 161px; /* since this element is floated, a width must be given */
height: 550px;
padding: 15px 0; /* top and bottom padding create visual space within this div */
margin-top: 0px;
}
.thrColLiqHdr #sidebar2 {
background: url(images/sides.gif);
float: right; /* this element must precede in the source order any element you would like it be positioned next to */
width: 161px; /* since this element is floated, a width must be given */
height: 550px;
padding: 15px 0; /* top and bottom padding create visual space within this div */
margin-top: 0px;
}
.thrColLiqHdr #sidebar1 p, .thrColLiqHdr #sidebar1 h3, .thrColLiqHdr #sidebar2 p, .thrColLiqHdr #sidebar2 h3 {
margin-left: 10px; /* the left and right margin should be given to every element that will be placed in the side columns */
margin-right: 10px;
}

/* Tips for mainContent:
1. the space between the mainContent and sidebars is created with the left and right margins on the mainContent div.
2. to avoid float drop at a supported minimum 800 x 600 resolution, elements within the mainContent div should be 300px or smaller (this includes images).
3. in the Internet Explorer Conditional Comment below, the zoom property is used to give the mainContent "hasLayout." This avoids several IE-specific bugs.
*/
.thrColLiqHdr #mainContent {
background: url(images/main.gif);
height: 515px;
margin: 60px 0% 0 0%; /* the right and left margins on this div element creates the two outer columns on the sides of the page. No matter how much content the sidebar divs contain, the column space will remain. You can remove this margin if you want the #mainContent div's text to fill the sidebar spaces when the content in each sidebar ends. */
padding: 5px;
}

.thrColLiqHdr #footer {
padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
background:#f67914;
}
.thrColLiqHdr #footer p {
margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
}

/* Miscellaneous classes for reuse */
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page The floated element must precede the element it should be next to on the page. */
float: left;
margin-right: 8px;
}
.clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain its child floats */
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}
#logo {
position: absolute;
top: 1px;
left: 30%;
}
#bar {
background: url(images/bar left.gif);
position: absolute;
height: 50px;
width: 375px;
left: 0px;
top: 143px;
}
#bar2 {
background: url(images/bar middle.gif);
position: absolute;
height: 50px;
left: 375px;
right: 375px;
top: 143px;
}
#bar3 {
background: url(images/bar right.gif);
position: absolute;
height: 50px;
width: 375px;
right: 0px;
top: 143px;
}
#borderTop {
position: absolute;
left: 23px;
top: 0px;
height: 23px;
width: 100%-46px;
}
#cornerTR {

}
#borderRight {

}
#cornerBR {

}
#borderBottom {

}
#cornerBL {

}
#borderLeft {

}
#cornerTL {

}
</style>
<!--[if IE]>
<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
.thrColLiqHdr #sidebar2, .thrColLiqHdr #sidebar1 { padding-top: 30px; }
.thrColLiqHdr #mainContent { zoom: 1; padding-top: 15px; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->
</head>

<body class="thrColLiqHdr">
<div id="container">
<div id="header">
<div align="left"><img src="images/logo pic.gif" alt="logo" width="116" height="110" /></div><div id="logo"><img src="images/logo text.gif" alt="logo" width="218" height="65" /></div>
<div id="dolphincontainer">
<div id="dolphinnav">
<ul>
<li><a href="default.html" title="home" class="current"><span>Home</span></a></li>
<li><a href="http://www.13styles.com" title="css website navigation menus"><span>About Us</span></a></li>
<li><a href="http://www.13styles.com" title="css website navigation menus"><span>proof</span></a></li>
<li><a href="http://www.13styles.com" title="css website navigation menus"><span>Our Work</span></a></li>
<li><a href="http://www.13styles.com" title="css website navigation menus"><span>Contact Us</span></a></li>
</ul>
</div>
</div>
<!-- end #header -->
</div>
</div>
<div id="sidebar1">
<!-- end #sidebar1 --></div>
<div id="sidebar2">
<!-- end #sidebar2 --></div>
<div id="mainContent">
<h1> Main Content </h1>
<p>put the content for the page in here </p>
<h2>H2 level heading </h2>
<p>more content goes in here</p>
<!-- end #mainContent --></div>
<!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
<div id="bar">
</div>
<div id="bar2">
</div>
<div id="bar3">
</div>
<br class="clearfloat" />
<div id="footer">
<p><font size="1pt">page template made by Jimbobd. Thanks for help from zymic. Navigation is a customized version of a menu available at <a href="http://www.13styles.com" target="_blank">13styles</a></font></p>
<!-- end #footer --></div>
<!-- end #container --></div>
</body>
</html>
Banjo
Would be helpfull for a prview, i know you said you don't want anyone to copy your work but whats the point in having a site then?
jimbobd
Firefox:
Internet Explorer:
MrTouz
First i would suggest you to seperate the CSS from the HTML.

this part should go inside a style.css file :

CODE
@charset "utf-8";
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #666666;
margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
color: #000000;
}
/* ---------------------- Dolphin nav ---------------------- */
#dolphincontainer{position:relative;height:56px;color:#E0E0E0;background:#C25E02
;width:100%;font-family:Helvetica,Arial,Verdana,sans-serif;}
#dolphinnav{position:relative;height:33px;font-size:12px;text-transform:uppercase;font-weight:bold;background:#f15903 url(images/dolphin_bg copy.gif) repeat-x bottom left;padding:0 0 0 20px;}
#dolphinnav ul{margin:0;padding:0;list-style-type:none;width:auto;float:left;}
#dolphinnav ul li{display:block;float:left;margin:0 1px;}
#dolphinnav ul li a{display:block;float:left;color:#EAF3F8;text-decoration:none;padding:0 0 0 20px;height:33px;}
#dolphinnav ul li a span{padding:12px 20px 0 0;height:21px;float:left;}
#dolphinnav ul li a:hover{color:#fff;background:transparent url(images/dolphin_bg-OVER copy.gif) repeat-x bottom left;}
#dolphinnav ul li a:hover span{display:block;width:auto;cursor:pointer;}
#dolphinnav ul li a.current,#dolphinnav ul li a.current:hover{color:#fff;background:#1D6893 url(images/dolphin_left-ON copy 2.gif) no-repeat top left;line-height:275%;}
#dolphinnav ul li a.current span{display:block;padding:0 20px 0 0;width:auto;background:#1D6893 url(images/dolphin_right-ON copy 2.gif) no-repeat top right;height:33px;}
/* ---------------------- END Dolphin nav ---------------------- */
.thrColLiqHdr #container {
width: 100%; /* this will create a container 100% of the browser width */
background: #FFFFFF;
margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
border: 1px solid #000000;
text-align: left; /* this overrides the text-align: center on the body element. */
}
.thrColLiqHdr #header {
background: url(images/header bg.gif);
background-repeat:repeat-x;
height: 110px;
padding: 0 px; /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
}
.thrColLiqHdr #header h1 {
margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
}

/* Tips for sidebars:
1. Since we are working in percentages, it's best not to use side padding on the sidebars. It will be added to the width for standards compliant browsers creating an unknown actual width.
2. Space between the side of the div and the elements within it can be created by placing a left and right margin on those elements as seen in the ".thrColLiqHdr #sidebar1 p" rule.
3. Since Explorer calculates widths after the parent element is rendered, you may occasionally run into unexplained bugs with percentage-based columns. If you need more predictable results, you may choose to change to pixel sized columns.
*/
.thrColLiqHdr #sidebar1 {
background: url(images/sides.gif);
float: left; /* this element must precede in the source order any element you would like it be positioned next to */
width: 161px; /* since this element is floated, a width must be given */
height: 550px;
padding: 15px 0; /* top and bottom padding create visual space within this div */
margin-top: 0px;
}
.thrColLiqHdr #sidebar2 {
background: url(images/sides.gif);
float: right; /* this element must precede in the source order any element you would like it be positioned next to */
width: 161px; /* since this element is floated, a width must be given */
height: 550px;
padding: 15px 0; /* top and bottom padding create visual space within this div */
margin-top: 0px;
}
.thrColLiqHdr #sidebar1 p, .thrColLiqHdr #sidebar1 h3, .thrColLiqHdr #sidebar2 p, .thrColLiqHdr #sidebar2 h3 {
margin-left: 10px; /* the left and right margin should be given to every element that will be placed in the side columns */
margin-right: 10px;
}

/* Tips for mainContent:
1. the space between the mainContent and sidebars is created with the left and right margins on the mainContent div.
2. to avoid float drop at a supported minimum 800 x 600 resolution, elements within the mainContent div should be 300px or smaller (this includes images).
3. in the Internet Explorer Conditional Comment below, the zoom property is used to give the mainContent "hasLayout." This avoids several IE-specific bugs.
*/
.thrColLiqHdr #mainContent {
background: url(images/main.gif);
height: 515px;
margin: 60px 0% 0 0%; /* the right and left margins on this div element creates the two outer columns on the sides of the page. No matter how much content the sidebar divs contain, the column space will remain. You can remove this margin if you want the #mainContent div's text to fill the sidebar spaces when the content in each sidebar ends. */
padding: 5px;
}

.thrColLiqHdr #footer {
padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
background:#f67914;
}
.thrColLiqHdr #footer p {
margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
}

/* Miscellaneous classes for reuse */
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page The floated element must precede the element it should be next to on the page. */
float: left;
margin-right: 8px;
}
.clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain its child floats */
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}
#logo {
position: absolute;
top: 1px;
left: 30%;
}
#bar {
background: url(images/bar left.gif);
position: absolute;
height: 50px;
width: 375px;
left: 0px;
top: 143px;
}
#bar2 {
background: url(images/bar middle.gif);
position: absolute;
height: 50px;
left: 375px;
right: 375px;
top: 143px;
}
#bar3 {
background: url(images/bar right.gif);
position: absolute;
height: 50px;
width: 375px;
right: 0px;
top: 143px;
}
#borderTop {
position: absolute;
left: 23px;
top: 0px;
height: 23px;
width: 100%-46px;
}
#cornerTR {

}
#borderRight {

}
#cornerBR {

}
#borderBottom {

}
#cornerBL {

}
#borderLeft {

}
#cornerTL {

}


Than the problem should come from here :

CODE
<!--[if IE]>
<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
.thrColLiqHdr #sidebar2, .thrColLiqHdr #sidebar1 { padding-top: 30px; }
.thrColLiqHdr #mainContent { zoom: 1; padding-top: 15px; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->


Its at least coming from a fix, the layout i guess was designed on an IE7 browser and this fix is for IE6 and i am guessing there is NO fix for FF.

This layout can be reproduced in a simpler way without that many divisions and IE FF problems.
jimbobd
I was already going to write a seperate css file when the layout was completely finished. But anyway, what are you suggesting I do to fix the ff problem?
MrTouz
start from scratch. I am guessing it is not your code, more over a tutorial, really what you are trying to do can be done really easyli without having to search around for this error.

I personaly don't know, but i am sure someone here knows how to fix it... if you bump the topic once or twice.
jimbobd
someone must know how this can be fixed!

I did get some help from a tutorial as this is my first template, but the overall template design is definately my own!
There is no way I am starting from scratch because this has taken me a very long time and I don't want it to go to waste. If I really have to then I will rewrite this myself specifically for firefox and have sort of two sites selected by javascript
MrTouz
yes but i still believe the level of work you are going to produce at this, you can save up to 50% of it by starting scratch?.
Bogey
If you really hate to start from scratch I'll do it for y ou (Start from scratch) and recode the template for you with both IE and Firefox compatible. It usually takes me 1-2 hours. Sometimes a little more but never more than 1 day.
MrTouz
QUOTE
.thrColLiqHdr #header {
background: url(images/header bg.gif);
background-repeat:repeat-x;
height: 110px;
padding: 0 px; /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
}


On the top of your site the BG is not repeating, i think the reason for that is because you are using :

background: to define a bg image. and you try to define its repeating it does not allow it. (not sure.. its a guess)

so its either :
CODE
background-image:url(yourimage.xxx);
background-repeat:repea-x;


or

CODE
background:url(yourimage.xxx) repeat-x;


But not both.

____

Also for your side bars i suggest you use a position:relative; with certain values for your margin. Not sure how to make it work with percentages because its how your site is mostly done. but you can work with that.

And you really need to clean out your code... but really, some parts are defined in a good way some others are just stuck together... its messy. really messy, its really why i would suggest a 'start from scratch'

Also :
CODE
#bar {
background: url(images/bar left.gif);
position: absolute;
height: 50px;
width: 375px;
left: 0px;
top: 143px;
}
#bar2 {
background: url(images/bar middle.gif);
position: absolute;
height: 50px;
left: 375px;
right: 375px;
top: 143px;
}
#bar3 {
background: url(images/bar right.gif);
position: absolute;
height: 50px;
width: 375px;
right: 0px;
top: 143px;
}


Your images are wrong, i mean it can't be 'bar right.gif' there is a space between bar and right should be something like bar_right.gif.
So i am guessing IE reads it... FF doesnt ?
CODE
#borderTop {
position: absolute;
left: 23px;
top: 0px;
height: 23px;
width: 100%-46px;


I don't know if 100%-46% is the correct way to set the width of an element :/

No really, the CSS is wrong in many ways, you can go one by one trying to find the errors, which i can do i have the template in front of me but like that its hard to know if i am going on the good direction.

I really, really suggest a start from scratch. but hey try the few bug fixes, and if they fix some of your problems than i guess you have a few to go smile.gif
Sickness
Maybe you should try with

CODE
#header {
background: url(images/header bg.gif);
background-repeat:repeat-x;
height: 110px;
padding: 0 px; /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
}


and not with

CODE
.thrColLiqHdr #header {
background: url(images/header bg.gif);
background-repeat:repeat-x;
height: 110px;
padding: 0 px; /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
}
MrTouz
well nithing will happen if you do not change your code :

CODE
.thrColLiqHdr #header {
background: url(images/header bg.gif);
background-repeat:repeat-x;
height: 110px;
padding: 0 px; /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
}


to

CODE
.thrColLiqHdr #header {
background: url(images/header_bg.gif);
background-repeat:repeat-x;
height: 110px;
padding: 0 px; /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
}


again, spaces between text on images name wont work.
jimbobd
i have had a look through and managed to improve it by taking out spaces this is the code for the page now:
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></title>
<!--<link href="free stuff.css" rel="stylesheet" type="text/css" />-->
<style type="text/css">
@charset "utf-8";
body {
font: 100% Verdana, Arial, Helvetica, sans-serif;
background: #666666;
margin: 0; /* it's good practice to zero the margin and padding of the body element to account for differing browser defaults */
padding: 0;
text-align: center; /* this centers the container in IE 5* browsers. The text is then set to the left aligned default in the #container selector */
color: #000000;
}
/* ---------------------- Dolphin nav ---------------------- */
#dolphincontainer{position:relative;height:56px;color:#E0E0E0;background:#C25E02
;width:100%;font-family:Helvetica,Arial,Verdana,sans-serif;}
#dolphinnav{position:relative;height:33px;font-size:12px;text-transform:uppercase;font-weight:bold;background:#f15903 url(images/dolphin_bg_copy.gif) repeat-x bottom left;padding:0 0 0 20px;}
#dolphinnav ul{margin:0;padding:0;list-style-type:none;width:auto;float:left;}
#dolphinnav ul li{display:block;float:left;margin:0 1px;}
#dolphinnav ul li a{display:block;float:left;color:#EAF3F8;text-decoration:none;padding:0 0 0 20px;height:33px;}
#dolphinnav ul li a span{padding:12px 20px 0 0;height:21px;float:left;}
#dolphinnav ul li a:hover{color:#fff;background:transparent url(images/dolphin_bg-OVER_copy.gif) repeat-x bottom left;}
#dolphinnav ul li a:hover span{display:block;width:auto;cursor:pointer;}
#dolphinnav ul li a.current,#dolphinnav ul li a.current:hover{color:#fff;background:#1D6893 url(images/dolphin_left-ON_copy_2.gif) no-repeat top left;line-height:275%;}
#dolphinnav ul li a.current span{display:block;padding:0 20px 0 0;width:auto;background:#1D6893 url(images/dolphin_right-ON_copy_2.gif) no-repeat top right;height:33px;}
/* ---------------------- END Dolphin nav ---------------------- */
.thrColLiqHdr #container {
width: 100%; /* this will create a container 100% of the browser width */
background: #FFFFFF;
margin: 0 auto; /* the auto margins (in conjunction with a width) center the page */
border: 1px solid #000000;
text-align: left; /* this overrides the text-align: center on the body element. */
}
.thrColLiqHdr #header {
background: url(images/header_bg.gif);
background-repeat:repeat-x;
height: 110px;
padding: 0 px; /* this padding matches the left alignment of the elements in the divs that appear beneath it. If an image is used in the #header instead of text, you may want to remove the padding. */
}
.thrColLiqHdr #header h1 {
margin: 0; /* zeroing the margin of the last element in the #header div will avoid margin collapse - an unexplainable space between divs. If the div has a border around it, this is not necessary as that also avoids the margin collapse */
padding: 10px 0; /* using padding instead of margin will allow you to keep the element away from the edges of the div */
}

/* Tips for sidebars:
1. Since we are working in percentages, it's best not to use side padding on the sidebars. It will be added to the width for standards compliant browsers creating an unknown actual width.
2. Space between the side of the div and the elements within it can be created by placing a left and right margin on those elements as seen in the ".thrColLiqHdr #sidebar1 p" rule.
3. Since Explorer calculates widths after the parent element is rendered, you may occasionally run into unexplained bugs with percentage-based columns. If you need more predictable results, you may choose to change to pixel sized columns.
*/
.thrColLiqHdr #sidebar1 {
background: url(images/sides.gif);
float: left; /* this element must precede in the source order any element you would like it be positioned next to */
width: 161px; /* since this element is floated, a width must be given */
height: 550px;
padding: 15px 0; /* top and bottom padding create visual space within this div */
margin-top: 0px;
}
.thrColLiqHdr #sidebar2 {
background: url(images/sides.gif);
float: right; /* this element must precede in the source order any element you would like it be positioned next to */
width: 161px; /* since this element is floated, a width must be given */
height: 550px;
padding: 15px 0; /* top and bottom padding create visual space within this div */
margin-top: 0px;
}
.thrColLiqHdr #sidebar1 p, .thrColLiqHdr #sidebar1 h3, .thrColLiqHdr #sidebar2 p, .thrColLiqHdr #sidebar2 h3 {
margin-left: 10px; /* the left and right margin should be given to every element that will be placed in the side columns */
margin-right: 10px;
}

/* Tips for mainContent:
1. the space between the mainContent and sidebars is created with the left and right margins on the mainContent div.
2. to avoid float drop at a supported minimum 800 x 600 resolution, elements within the mainContent div should be 300px or smaller (this includes images).
3. in the Internet Explorer Conditional Comment below, the zoom property is used to give the mainContent "hasLayout." This avoids several IE-specific bugs.
*/
.thrColLiqHdr #mainContent {
background: url(images/main.gif);
height: 515px;
margin: 60px 0% 0 0%; /* the right and left margins on this div element creates the two outer columns on the sides of the page. No matter how much content the sidebar divs contain, the column space will remain. You can remove this margin if you want the #mainContent div's text to fill the sidebar spaces when the content in each sidebar ends. */
padding: 5px;
}

.thrColLiqHdr #footer {
padding: 0 10px; /* this padding matches the left alignment of the elements in the divs that appear above it. */
background:#f67914;
}
.thrColLiqHdr #footer p {
margin: 0; /* zeroing the margins of the first element in the footer will avoid the possibility of margin collapse - a space between divs */
padding: 10px 0; /* padding on this element will create space, just as the the margin would have, without the margin collapse issue */
}

/* Miscellaneous classes for reuse */
.fltrt { /* this class can be used to float an element right in your page. The floated element must precede the element it should be next to on the page. */
float: right;
margin-left: 8px;
}
.fltlft { /* this class can be used to float an element left in your page The floated element must precede the element it should be next to on the page. */
float: left;
margin-right: 8px;
}
.clearfloat { /* this class should be placed on a div or break element and should be the final element before the close of a container that should fully contain its child floats */
clear:both;
height:0;
font-size: 1px;
line-height: 0px;
}
#logo {
position: absolute;
top: 1px;
left: 30%;
}
#bar {
background: url(images/bar_left.gif);
position: absolute;
height: 50px;
width: 375px;
left: 0px;
top: 143px;
}
#bar2 {
background: url(images/bar_middle.gif);
position: absolute;
height: 50px;
left: 375px;
right: 375px;
top: 143px;
}
#bar3 {
background: url(images/bar_right.gif);
position: absolute;
height: 50px;
width: 375px;
right: 0px;
top: 143px;
}
#borderTop {
position: absolute;
left: 23px;
top: 0px;
height: 23px;
width: 100%-46px;
}
#cornerTR {

}
#borderRight {

}
#cornerBR {

}
#borderBottom {

}
#cornerBL {

}
#borderLeft {

}
#cornerTL {

}
</style>
<!--[if IE]>
<style type="text/css">
/* place css fixes for all versions of IE in this conditional comment */
.thrColLiqHdr #sidebar2, .thrColLiqHdr #sidebar1 { padding-top: 30px; }
.thrColLiqHdr #mainContent { zoom: 1; padding-top: 15px; }
/* the above proprietary zoom property gives IE the hasLayout it needs to avoid several bugs */
</style>
<![endif]-->
</head>

<body class="thrColLiqHdr">
<div id="container">
<div id="header">
<div align="left"><img src="images/logo_pic.gif" alt="logo" width="116" height="110" /></div><div id="logo"><img src="images/logo_text.gif" alt="logo" width="218" height="65" /></div>
<div id="dolphincontainer">
<div id="dolphinnav">
<ul>
<li><a href="default.html" title="home" class="current"><span>Home</span></a></li>
<li><a href="http://www.13styles.com" title="css website navigation menus"><span>About Us</span></a></li>
<li><a href="http://www.13styles.com" title="css website navigation menus"><span>proof</span></a></li>
<li><a href="http://www.13styles.com" title="css website navigation menus"><span>Our Work</span></a></li>
<li><a href="http://www.13styles.com" title="css website navigation menus"><span>Contact Us</span></a></li>
</ul>
</div>
</div>
<!-- end #header -->
</div>
</div>
<div id="sidebar1">
<!-- end #sidebar1 --></div>
<div id="sidebar2">
<!-- end #sidebar2 --></div>
<div id="mainContent">
<h1> Main Content </h1>
<p>put the content for the page in here </p>
<h2>H2 level heading </h2>
<p>more content goes in here</p>
<!-- end #mainContent --></div>
<!-- This clearing element should immediately follow the #mainContent div in order to force the #container div to contain all child floats -->
<div id="bar">
</div>
<div id="bar2">
</div>
<div id="bar3">
</div>
<br class="clearfloat" />
<div id="footer">
<p><font size="1pt">page template made by Jimbobd. Thanks for help from <a href="http://www.zymic.com" target="_blank">zymic</a>. Navigation is a customized version of a menu available at <a href="http://www.13styles.com" target="_blank">13styles</a></font></p>
<!-- end #footer --></div>
<!-- end #container --></div>
</body>
</html>
MrTouz
just looked at ym post above yours...

background: url... should be

background-image:url(....);
Andrew
QUOTE(MrTouz @ Aug 6 2008, 05:41 AM) *
just looked at ym post above yours...

background: url... should be

background-image:url(....);


No you can do either he could have actually wrote something like:
background: url(images/header_bg.gif) repeat-x #625455;
and so on, and it still works the same and actually makes your css file smaller, if you can work that way I'd suggest it because with larger css files, it can save alot of space.
MrTouz
Yes i know but if you read my code :

i had background-repeat:repeat-x;

Meaning, i detailed the code, so basically what i needed is either :

background:url(something.jpg) repeat....

or

background-image...
background-repeat...

Having both is useless since if you use background: its to have all values in one line biggrin.gif
Andrew
I never suggested to have both?
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2010 Invision Power Services, Inc.