Click to See Complete Forum and Search --> : Cross-Browsers Alignment


wanttea
05-23-2007, 04:01 PM
I have received good suggestions to create Unordered list for links. After I built it, it works very well with IE but the position is off using Firefox and Netscape. Please advice, thanks.

http://www.wendysign.net/fairmont/res_collections.html

/* Background image for top */
body {
background-color: #f7f7f5;
background-image: url("images/index_bg.gif");
background-repeat: repeat-x;
background-attachment: fixed;}
# {
margin:0; padding:0; border:0;
}
/* side bar */
td.sidebar {
width: 200px;
height: 483px;
background-image: url("images/residential/sidebar.gif");
background-repeat: no-repeat;
}
div.sidelink ul {
position: relative; top: -92px;
font-size:.8em;
list-style-type:none;
padding:0;
margin: 0;
}
div.sidelink li {
text-align: right;
padding: 0px 15px 1px 5px;
}
div.sidelink a{
text-decoration:none; color:#ffffff;
}
div.sidelink a:hover {
text-decoration:none; color:#000000;
}

felgall
05-23-2007, 05:32 PM
Did you mean to put

* {
margin:0; padding:0; border:0;
}

wanttea
05-23-2007, 05:46 PM
Yes this sets the default margins, padding etc to zero

Centauri
05-23-2007, 05:49 PM
A couple of problems here.

First off, the universal selector for setting the default margins and paddings is * not # , and I usually recommend not including the border in this (causes too many headaches with form inputs).

Next problem is the dotted divisions are part of the background graphic so the alignment depends on the way the browser renders text. I would suggest here settimg explicit font-size and line-height in pixels for the <a> links - experiment to find the right numbers.

Other thing is NONE of this needs to be in a table, and is an incorrect use for tables anyway (they are for tabular data). Better to have a wrapper div set to 683px wide with auto side margins, then float the <ul> left and use margins / padding for positioning.

Cheers
Graeme

wanttea
05-23-2007, 06:06 PM
yes you're right. I didn't even realize I used #, thanks

I am very worried about not using tables, but I will try

Centauri
05-23-2007, 09:28 PM
No need to worry about not using tables - just think content and then styling.

Here is a play with your site using no tables, and offering a little more flexibility in the sidebar in that all the dotted borders and the heading are done via html / css rather than via the graphic (the solid graphic I used is attached). This means that content and text size can be varied somewhat without any changes required to the graphic. It also provides textual content to screen readers etc rather than relying on visual graphic text.

The html used (note html 4.01 strict doctype) :<!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>Fairmont Designs Collections</title>
<link href="rescss_collections.css" rel="stylesheet" type="text/css">
</head>

<body>
<div id="wrapper">
<div class="sidebar">
<ul>
<li><h2>Residential</h2></li>
<li><a href="res_collections.html" class="first">Collections</a></li>
<li><a href="#">American Themes</a></li>
<li><a href="#">Bonaparte</a></li>
<li><a href="#">Cascadia</a></li>
<li><a href="#">Estates II</a></li>
<li><a href="#">Hudson Heights</a></li>
<li><a href="#">Repertoire</a></li>
<li><a href="#">Retrospect</a></li>
<li><a href="#">Tamarind Grove</a></li>
<li><a href="#">Villa Veneto</a></li>
<li><a href="#" class="first">Contact Us</a></li>
</ul>
</div>
</div>
</body>
</html>

and the css file :* {
margin: 0;
padding: 0;
}
body {
background-color: #f7f7f5;
background-image: url(images/index_bg.gif);
background-repeat: repeat-x;
background-attachment: fixed;
font-family: Arial, Helvetica, sans-serif;
font-size: 14px;
}
#wrapper {
width: 683px;
margin: 0 auto;
}
.sidebar {
background-image: url(images/sidebar.gif);
width: 149px;
height: 483px;
float: left;
margin-top: 10px;
}
.sidebar ul {
width: 120px;
border-left: 1px dotted white;
margin: 15px 0 0 15px;
height: 440px;
}
.sidebar li {
list-style: none;
}
.sidebar a {
color: #FFFFFF;
text-align: right;
font-size: 12px;
line-height: 20px;
font-family: "Times New Roman", Times, serif;
text-decoration: none;
width: 120px;
display: block;
}
.sidebar a:hover {
color: #000000;
}
.sidebar .first {
font-weight: bold;
padding-top: 10px;
border-top: 1px dotted white;
}
.sidebar h2 {
color: #FFFFFF;
font-weight: normal;
font-size: 18px;
text-align: center;
margin-bottom: 5px;
}


Cheers
Graeme

wanttea
05-23-2007, 10:42 PM
THANKS! i will experiment with your codes. I almost gave up on CSS several times but with the kind of support like yours, it keeps me going and improving, thanks!

wanttea
05-23-2007, 11:39 PM
One question:

The codes so far are for left side navigation. I will have image thumbnails on the right side..probably about 4-5 images per row, with a total of 3 rows. If I were to use CSS, would you recommend using relative positioning to place those thumbnails or table cells be a better choice? Please advice, thanks

Centauri
05-23-2007, 11:54 PM
Relative positioning is just for minor positioning adjustments - the object still "occupies" the original position and is just displayed offset by the given dimensions. It is much better to allow elements to stack naturally by using margins and floats. Divs can be used to logically "group" items together, such as images with associated text, and positioned as a whole. With a little more detail about what you want to achieve, with perhaps a sample picture of how the content is to be displayed, we can advise further.

Definately don't use tables unless you are displaying tabular data, though.

HazardTW
05-24-2007, 12:15 AM
THANKS! i will experiment with your codes. I almost gave up on CSS several times but with the kind of support like yours, it keeps me going and improving, thanks!

Check this place out: http://www.mezzoblue.com/zengarden/resources/

Trust me when I say it will be worth your time, positioning with CSS doesn't seem to make sense when you are used to using tables but when you learn what you can do with CSS, your T, R, and D keys will thank you for it.

WebJoel
05-24-2007, 08:19 AM
After you have done a few sites using CSS you will decry the horror that is TABLE-built layout. -It has it's place yes, but this is so much easier and quicker, more cross-browser and many more effects can be created non-tables. :)

wanttea
05-24-2007, 06:54 PM
Thanks for all the support. I tried without using table when building a new page. I was very excited and started falling in love with CSS since after studying Centauri’s code, I began to have a better understanding and it became easier for me. As I was building it, I used IE for testing and it came up pretty good. The only thing that didn’t work for me was the top navigation. I tried to space the dotted white lines so they won’t be right next to the links but wasn’t successful.

Then after I was done, I almost got a heart attack when I tested them with Firefox and Netscape. All the alignment was off. What did I miss or not do right? Please help, thanks.

p.s. the area where the thumbnails are located differ from page to page that’s why my styles for that part are mostly in the html doc.

http://www.wendysign.net/fairmont/res_collections.html

Please see CSS codes below, THANKS!




* {
margin: 0;
padding: 0;
}

/* Background */
body {
background-color: #f7f7f5;
background-image: url(images/index_bg.gif);
background-repeat: repeat-x;
background-attachment: fixed;
font-family: Times New Roman, Times,serif;
}
/* css table */
#wrapper {
width: 683px;
margin: 0 auto;
padding: 5px;
}
/* links */
a {
color: #ad7f6b;
font-size: 12px;
text-decoration: none;
}
a:hover {
color: #000000;
}


/* sidebar */
.sidebar {
background-image: url(images/residential/sidebar.gif);
width: 149px;
height: 483px;
float: left;
margin-top: 40px;
}
/* side links */
.sidebar ul {
width: 120px;
border-left: 1px dotted white;
margin: 20px 0 0 15px;
height: 450px;
}
.sidebar li {
list-style: none;
}
.sidebar a {
color: #FFFFFF;
text-align: right;
font-size: 12px;
line-height: 20px;
text-decoration: none;
width: 120px;
display: block;
}
.sidebar a:hover {
color: #000000;
}
.sidebar .first {
font-weight: bold;
padding-top: 10px;
border-top: 1px dotted white; margin-top: 18px;
}

/* top navigation */

.topmenu ul {
margin: 20px 0 0 0;
padding: 0 0 0 110px;
height: 450px;
}
.topmenu li {
padding:0 5px 0 0px;
float:left;
}
.topmenu .whiteline {
border-left: 1px dotted white;
}
.topmenu a {
color: #FFFFFF;
text-align: right;
font-size: 12px;
text-decoration: none;
display: block;
}
.topmenu a:hover {
color: #000000;
}

/* Middle Background */

.middlebg {
background-image: url(images/residential/middlebg.gif);
width: 560px;
height: 454px;
float: right;
margin-top: -483px; margin-left: 150px;
}

WebJoel
05-24-2007, 06:59 PM
You have three missing-expected "</div>"s

Centauri
05-24-2007, 10:03 PM
As WebJoel pointed out, there are a few unclosed divs. However, the overall structure needs a little work as well.

As for the alignment on the side menu, I notice you went back to the graphical "residential" text, which is fine, but we need to align the text around it. My original coding with this text as a <h2> header provided content for the benefit of screen readers etc - at the moment, a vision-impared person would have no idea they are on the Residential Collections page. The <h2> also spaced the first link, and hence the dotted line, down from the top. Putting the <h2> back in there and hiding the text visually not only gives content, it also spaces the dotted line down.

As the top logo and links are positioned above the rest of the page, they can logically come first in the html. Whilst the logo image looks fine, it means nothing to screen readers and search engines, so this is best marked up as a <h1> heading text, with the actual text hidden and replaced by the graphic logo in the css. The logo and the top links can also be logically grouped within the one element.

The content div has a problem overlapping the side menu. As the menu is floated, the content div does not need to be floated - it can just get a side margin to ovoid the float and slide behind it, There is also then no need to give a width - it will fill the area naturally.

At the moment, there is not really a connection between each thumbnail graphic and the text link - they are essentially two separate links. There is also a lot of repeated inline css which can be cleaned up. As the thumbnails are essentially a group of links - a list - they can be logically grouped as a list, just like the menus. As each thumbnail picture is essentially visual "decoration" for the link, the graphics themselves can be background images. Each <a> tag in the list can be styled as a block of a particular size (as each thumbnail is the same size) with the graphic inserted as a background vis inline styles to avoid a stack of different classes. The list <li>s can then be floated and spaced to give the grid.

The html I therefore came up with is :<!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>Fairmont Designs Collections</title>
<link href="rescss_collections.css" rel="stylesheet" type="text/css">
</head>

<body>
<div id="wrapper">

<!-- top banner -->
<div class="topmenu">
<h1><a href="http://www.fairmontdesigns.com">Fairmont Designs</a></h1>
<ul>
<li><a href="#">Home</a></li>
<li class="whiteline"><a href="#">About Us</a></li>
<li class="whiteline"><a href="#">Site Map</a></li>
</ul>
</div>
<!-- side bar -->
<div class="sidebar">
<ul>
<li><h2>Residential</h2></li>
<li><a href="res_collections.html" class="first">Collections</a></li>
<li><a href="#">American Themes</a></li>
<li><a href="#">Bonaparte</a></li>
<li><a href="#">Cascadia</a></li>
<li><a href="#">Estates II</a></li>
<li><a href="#">Hudson Heights</a></li>
<li><a href="#">Repertoire</a></li>
<li><a href="#">Retrospect</a></li>
<li><a href="#">Tamarind Grove</a></li>
<li><a href="#">Villa Veneto</a></li>
<li><a href="#" class="first">Contact Us</a></li>
</ul>
</div>


<div class="middlebg">

<!-- thumbnails row 1 -->
<ul class="thumbs">
<li><a href="#" style="background-image:url(images/residential/thb_AT.jpg)" title="American Themes Collection">American Themes</a></li>
<li><a href="#" style="background-image:url(images/residential/thb_AT.jpg)" title="Bonaparte Collection">Bonaparte</a></li>
<li><a href="#" style="background-image:url(images/residential/thb_AT.jpg)" title="Cascadia Collection">Cascadia</a></li>
<li><a href="#" style="background-image:url(images/residential/thb_AT.jpg)" title="Estates II Collection">Estates II</a></li>
<li><a href="#" style="background-image:url(images/residential/thb_AT.jpg)" title="Hudson Heights Collection">Hudson Heights</a></li>
<li><a href="#" style="background-image:url(images/residential/thb_AT.jpg)" title="Repertoire Collection">Repertoire</a></li>
<li><a href="#" style="background-image:url(images/residential/thb_AT.jpg)" title="Retrospect Collection">Retrospect</a></li>
<li><a href="#" style="background-image:url(images/residential/thb_AT.jpg)" title="Tamarind Grove Collection">Tamarind Grove</a></li>
<li><a href="#" style="background-image:url(images/residential/thb_AT.jpg)" title="Villa Veneto Collection">Villa Veneto</a></li>
</ul>
</div>
</div>
</body>
</html>
and the css: * {
margin: 0;
padding: 0;
}
/* Background */
body {
background-color: #f7f7f5;
background-image: url(images/index_bg.gif);
background-repeat: repeat-x;
background-attachment: fixed;
font-family: Times New Roman, Times,serif;
}

/* links */
a {
color: #ad7f6b;
font-size: 12px;
text-decoration: none;
}
a:hover {
color: #000000;
}

/* css table */
#wrapper {
width: 683px;
margin: 0 auto;
padding: 5px;
overflow: hidden;
}
/* sidebar */
.sidebar {
background-image: url(images/residential/sidebar.gif);
width: 149px;
height: 483px;
float: left;
margin-top: 5px;
}
/* side links */
.sidebar ul {
width: 120px;
border-left: 1px dotted white;
margin: 20px 0 0 15px;
height: 450px;
}
.sidebar li {
list-style: none;
}
.sidebar a {
color: #FFFFFF;
text-align: right;
font-size: 12px;
line-height: 20px;
text-decoration: none;
width: 120px;
display: block;
}
.sidebar a:hover {
color: #000000;
}
.sidebar .first {
font-weight: bold;
padding-top: 10px;
border-top: 1px dotted white; margin-top: 18px;
}
.sidebar h2 {
display: block;
font-size: 1px;
text-indent: -1000px;
height: 10px;
}

/* top navigation */

.topmenu {
height: 36px;
overflow: hidden;
}
.topmenu ul {
margin: 20px 0 0 20px;
float: left;
display: inline;
}
.topmenu li {
float:left;
list-style: none;
display: inline;
}
.topmenu .whiteline {
border-left: 1px dotted white;
}
.topmenu a {
color: #FFFFFF;
font-size: 12px;
text-decoration: none;
display: block;
padding: 0 5px;
line-height: 16px;
}
.topmenu a:hover {
color: #000000;
}
.topmenu h1 {
float: left;
width: 145px;
height: 36px;
background-image: url(images/logo.png);
font-size: 1px;
margin-left: 149px;
display: inline;
text-indent: -1000px;
}


/* Middle Background */

.middlebg {
background-image: url(images/residential/middlebg.gif);
height: 434px;
margin: 5px 0 0 150px;
padding: 20px 5px 0;
}
.middlebg .thumbs {
}
.middlebg .thumbs li {
list-style: none;
float: left;
display: inline;
margin: 0 0 10px 20px;
}

.middlebg .thumbs a {
display: block;
width: 106px;
height: 21px;
text-align: center;
padding-top: 70px;
}


Note that various display:inline declarations are for the benefit of IE6 double margin float bug.

Cheers
Graeme

wanttea
05-25-2007, 03:52 PM
Wow! Thanks a million. Your codes are so much tidier and the layout actually works both with IE and Firefox. You have a very good explanation. I spent the last couple hours studying your codes and I am going to build another page based on them and hopefully I will get an even better understanding.

By the way, the logo which is acting like a link works well with Firefox but not IE. I could not figure it out. You have any idea?

Your instructions are so much better than my book that I am using as reference.

HazardTW
05-25-2007, 05:19 PM
"IE6 double margin float bug."

Can you point us to a place where this bug is discussed so we can recognize it and know how to deal with it?

pleeeeeeeease.... :)

Centauri
05-25-2007, 06:32 PM
By the way, the logo which is acting like a link works well with Firefox but not IE. I could not figure it out. You have any idea?

I hadn't noticed that. Because the <h1> is styled with a big negative text indent to shove the text way off the left of the screen to hide it, IE is also taking the <a> with the text. The fix is the apply the <h1> styles to the <a> instead, so .topmenu h1 in the css now becomes .topmenu h1 a. As the <a> tag styling just above this in the css applies padding to the <a>, we remove that in the revised css :.topmenu h1 a {
float: left;
width: 145px;
height: 36px;
background-image: url(images/logo.png);
font-size: 1px;
margin-left: 149px;
display: inline;
text-indent: -1000px;
padding: 0;
}

wanttea
05-25-2007, 07:04 PM
thanks! I didn't have the chance to code a new page but I added the bottom part trying to use your method. I think I am doing pretty good (i guess?) except that I can't figure out how to increase the length of the borders above and below the logo.

Please let me know if my codes are neater and simpler comparing to last time :)

thanks!!

http://www.wendysign.net/fairmont/res_collections.html


/* bottom section */
.botmenu {
overflow: hidden;
}
.botmenu ul {
margin-left: 370px;
display: inline;
}
.botmenu li {
list-style: none;
display: inline;
}
.botmenu .whiteline {
border-left: 1px dotted #606a74;
}
.botmenu a {
color: #606a74;
font-size: 12px;
text-decoration: none;
padding: 0 5px;
line-height: 16px;
}
.botmenu a:hover {
color: #000000;
}
.botmenu h1 {
display: block;
width: 110px;
height: 27px;
background-image: url(images/logo_bottom.gif);
background-repeat: no-repeat;
background-position: center;
font-size: 1px;
margin-left: 418px;
margin-top: 5px;
text-indent: -1000px;

}
.botmenu p
{
margin-left: 262px;
margin-top: 5px;
text-align: left;
display: block;
font-family: Times New Roman, Times,serif;
font-size: 11px;
color:#606a74;
}
.botmenu .first {
padding-top:5px;
padding-bottom:5px;
border-bottom: 1px dotted #606a74;
border-top: 1px dotted #606a74;
}

wanttea
05-25-2007, 07:44 PM
Oh i forgot to point out...I still used the image file "residential" instead of using text in the html because I wanted to keep that font, which most likely most browsers won't display. But it is a great idea to retain the h2 tag, thanks!

Centauri
05-25-2007, 07:45 PM
Doing quite well!

Semantically, the <h1> tag on the top logo makes sense as a <h1> means the first major heading of the page. Howevber, it does not make sense down at the bottom. Whilst the bottom name could be just a normal paragraph, a little more importance could be assigned to it via maybe a <h5> tag. As in my post just above, we style the <a> within the <h5> to get the link to work. I also note that, due to the large left margins pushing everything to the right, user changing of text size breaks it - better to float all these to the right, and clear right to stack them vertically

html :<div class="botmenu">
<ul>
<li><a href="#">Home</a></li>
<li class="whiteline"><a href="#">About Us</a></li>
<li class="whiteline"><a href="#">Site Map</a></li>
</ul>
<h5><a href="http://www.fairmontdesigns.com">Fairmont Designs</a></h5>
<p>Copyright � 2007 Fairmont Designs. All Rights reserved</p>
</div>
and css :/* bottom section */
.botmenu {
overflow: hidden;
}
.botmenu ul {
display: inline;
float: right;
}
.botmenu li {
list-style: none;
display: inline;
}
.botmenu .whiteline {
border-left: 1px dotted #606a74;
}
.botmenu a {
color: #606a74;
font-size: 12px;
text-decoration: none;
padding: 0 5px;
line-height: 16px;
}
.botmenu a:hover {
color: #000000;
}
.botmenu h5 a {
width: 110px;
height: 27px;
background-image: url(images/logo_bottom.gif);
background-repeat: no-repeat;
background-position: center;
font-size: 1px;
margin-top: 5px;
text-indent: -1000px;
float: right;
clear: right;
border-bottom: 1px dotted #606a74;
border-top: 1px dotted #606a74;
padding: 5px 10px;

}
.botmenu p
{
margin-top: 5px;
text-align: left;
font-family: Times New Roman, Times,serif;
font-size: 11px;
color:#606a74;
float: right;
clear: right;
}


Note the padding in the .botmenu h5 a css - the first 5px sets the top and bottom which is the distance between the dotted lines and logo, and the second 10px figure sets the overall width of the <a> and therefore the length of the dotted lines.

Cheers
Graeme

wanttea
05-26-2007, 01:28 PM
thank you Sir. You have exposed me to a few codes that weren't even mentioned in my book (e.g. clear:, etc). Would you mind telling me how long it took you to become skilled in CSS? Did you take classes or was it mostly self-taught?

ray326
05-26-2007, 02:20 PM
Sounds like you might need to look into some new books. Check the ones in my sig.

Centauri
05-26-2007, 07:20 PM
Did you take classes or was it mostly self-taught?

No classes, most of my learning was right here on these forums, coupled with great resource sites such as
Stu Nicholls' css play (http://www.cssplay.co.uk/)
Eric Meyer's css /edge (http://meyerweb.com/eric/css/edge/)
BonRouge (http://www.bonrouge.com/br.php?page=home)
A List Apart (http://alistapart.com/topics/code/css/)
css Zen Garden (http://www.csszengarden.com/)
Listamatic (http://css.maxdesign.com.au/listamatic/index.htm)
Position is Everything (http://www.positioniseverything.net/articles.html)
Well Styled (http://www.wellstyled.com/index.html)
among others, and MOST IMPORTANTLY, practise and experimentation - try various things and see what they do.

PS: You never stop learning something new

HazardTW
05-28-2007, 03:51 AM
Centauri, I have been to some of those places you linked and have bookmarked the ones I have not, thank you for those.

I need to do a lot more reading before I continue with my project, IE is really kicking my arse.

It seems a lot of people start building webs and using IE, then they wonder what is wrong with the other browsers.

As for myself, I would build a page in DW and notice that it looked just the way I intended in FF, but it NEVER looked the way I intended in any version of IE. Then I came here and found out that it wasn't just me being stupid.

Are there industry statistics on how much money large companies would save if they only had to develop standardized web sites vs making them work in all versions of IE?

wanttea
05-28-2007, 03:28 PM
HazardTW

I had problems the other way round. I was testing my pages based on IE since I have been told that IE is still the most popular browser, ended up they all looked jagged up in FF and Netscape. Now one of my pages looks fine in FF and IE but screwed up in Netscape. My current company told me to forget about Netscape users after all..which is the audience I don't want to give up on. I have not even tested on MAC Safari and IE...scared just to think about it.

HazardTW
05-29-2007, 04:25 AM
I stumbled across this site tonight:

http://www.barelyfitz.com/

Ran through the "Learn CSS positioning in ten steps" and it saved my life ;)

I kept reading that position:absolute was supposed to be relative to that elements containing block, but it always was absolute to the page for me, until I found the website linked above.

wanttea
05-31-2007, 09:50 PM
no news is good news. Haven't posted anything since I have been able to code "independently". Thanks Centauri/Graeme!

wanttea
06-04-2007, 07:04 PM
Hi Centauri! I thought I was independent but I am running into trouble AGAIN!

I was doing quite well until I got to this page

http://fairmontdesigns.com/wendy/cab_cottage3_TEST.html

It looks fine with IE 7 (Altho the link and logo are way in the bottom) but looks all jagged up with Firefox. I wonder if it has to do with the side bar. The reason why I have such a long side bar is because after one adjusts the text size, the links on side bar extend outside of it.

Please see attached to see a layout of the page in jpg. It is only a sample so the color and the links are not accurate.

* {
margin: 0;
padding: 0;
}
/* Background */
body {
background-color: #f7f7f5;
background-image: url(images/index_bg.gif);
background-repeat: repeat-x;
background-attachment: fixed;
font-family: Times New Roman, Times,serif;
}

/* font */
p {
font-family: Times New Roman, Times,serif;
font-size: 12px;
font-weight: bold;
color: #577993;
}

/* links */
a {
color: #7d98ad;
font-size: 11px;
text-decoration: none;
}
a:hover {
color: #000000;
}

/* css table */
#wrapper {
width: 683px;
margin: 0 auto;
padding: 5px;
overflow: hidden;

}
/* sidebar */
.sidebar {
background-image: url(images/cabinetry/sidebar.gif);
background-repeat: no-repeat;
width: 149px;
height: 850px;
float: left;
margin-top: 5px;

}
/* side links */
.sidebar ul {
width: 120px;
border-left: 1px dotted white;
margin: 15px 0 0 15px;
height: 800px;
}
.sidebar li {
list-style: none;
}
.sidebar .first {
font-size: 11px;
padding-top: 10px;
border-top: 1px dotted white; margin-top: 18px;
}
.sidebar a {
color: #FFFFFF;
text-align: right;
font-size: 9px;
font-weight: bold;
line-height: 15px;
text-decoration: none;
width: 120px;
display: block;
}
.sidebar a:hover {
color: #000000;
}
.sidebar h2 {
display: block;
font-size: 1px;
text-indent: -1000px;
height: 10px;
}

/* top navigation */

.topmenu {
height: 36px;
overflow: hidden;
}
.topmenu ul {
margin: 20px 0 0 225px;
float: left;
display: inline;
}
.topmenu li {
float:left;
list-style: none;
display: inline;
}
.topmenu .whiteline {
border-left: 1px dotted white;
}
.topmenu a {
color: #FFFFFF;
font-size: 12px;
text-decoration: none;
display: block;
padding: 0 5px;
line-height: 16px;
}
.topmenu a:hover {
color: #000000;
}
.topmenu h1 a {
float: left;
width: 145px;
height: 36px;
background-image: url(images/logo.png);
background-repeat: no-repeat;
font-size: 1px;
margin-left: 149px;
display: inline;
text-indent: -1000px;
}


/* Middle Background */

.middlebg {
background-image: url(images/cabinetry/Cottage3/middlebg.gif);
background-repeat: no-repeat;
height: 770px;
margin: 5px 0 0 150px;
padding: 20px 5px 0;
}

/* Product Image */

.middlebg .columnone {
float:left;
width:230px;
margin:15px 0 5px 5px;
}

/* product description */

.middlebg .columntwo {
float: left;
width: 250px;
display: block;
margin: 15px 0 0 20px;
}

.middlebg .columntwo li {
list-style: disc;
font-family: Times New Roman, Times,serif;
text-align: left;
line-height: 20px;
font-size: 12px;
color: #01263a;
}
.middlebg .columntwo a {
font-size: 12px;
text-decoration: underline;
color: #01263a;
}
.middlebg .columntwo a:hover {
color: #ffffff;
}


/* bottom thumbnails section */
.middlebg .botthumb {
display: block;
clear: left;
}
.middlebg .botthumb li {
list-style: none;
float: left;
display: inline;
margin: 0 0 0 5px;
}

.middlebg .botthumb a {
display: block;
width: 106px;
height: 20px;
text-align: center;
padding-top: 70px;
}

/* bottom section */
.botmenu {display: block;

}
.botmenu ul {

float: right;
}
.botmenu li {
list-style: none;
display: inline;
}
.botmenu .whiteline {
border-left: 1px dotted #606a74;
}
.botmenu a {
color: #606a74;
font-size: 12px;
text-decoration: none;
padding: 0 5px;
line-height: 15px;
}
.botmenu a:hover {
color: #000000;
}
.botmenu h5 a {
width: 110px;
height: 27px;
background-image: url(images/logo_bottom.gif);
background-repeat: no-repeat;
background-position: center;
font-size: 1px;
margin-top: 5px;
text-indent: -1000px;
float: right;
clear: right;
border-bottom: 1px dotted #606a74;
border-top: 1px dotted #606a74;
padding: 5px 10px;

}
.botmenu p
{
margin-top: 5px;
text-align: left;
font-family: Times New Roman, Times,serif;
font-size: 11px;
color:#606a74;
float: right;
clear: right;
}

OH and by the way, the reason why the bottom links are way at the bottom because I had a page that has many thumbnails

http://fairmontdesigns.com/wendy/cab_collections.html

THANK YOU!!!

Centauri
06-04-2007, 09:13 PM
Hi again,

Not at my normal computer at the moment to have a play, but the main problem is the clear:left on the .middlebg .botthumb ul - it is clearing everything to the left, including the menu. As the product image and product description are related items, instead of using left and right columns, create a div with class "product" and put the image and description list in this. Then in the css, .middlebg .product img {float: left} will float the image to the left and the description ul should then sit beside it. You might also need to add a right margin to the above image css to space the text away a little. Doing this means you will no longer need that clear on the thumbs ul. Also make sure you use a overflow:hidden on the .product div to clear the image in case it is larger than the text.

If you have problems with this, I will be back on my normal computer later on.

Cheers
Graeme

wanttea
06-05-2007, 10:27 AM
Yes Sir! I will try again right now. Whether I am successful or not, i will keep you updated, thanks Teacher!

wanttea
06-05-2007, 02:09 PM
Hi Centauri

I tried the method but for some reason, even with a new div (botthumb) and display:block; the thumbnails won’t form their own block (since I want thumbnails to be placed right below the main image without being affected by the descriptive text (list). The thumbnails went directly underneath the list, therefore I had to use margins to move them to the left and right underneath the main image. However, when I increase text size or if there is more text involved, the thumbnails still gets moved down. (please see pages to compare)
http://fairmontdesigns.com/wendy/cab_cottage3.html

http://fairmontdesigns.com/wendy/cab3_cottage3.html

The bottom links almost have the same issue. They get affected by the side bar. How do I get them to work independently? Please advice!

Finally, since the line-height text / size of the links on the side bar change when users change their browsers’ text size, I extended the bar a lot longer than it was before. Without extending the length, the text go outside of bar or disappear. Besides this method, would you have other suggestions?

Thanks!!!!

wanttea
06-05-2007, 02:10 PM
Sorry here are the css codes

* {
margin: 0;
padding: 0;
}
/* Background */
body {
background-color: #f7f7f5;
background-image: url(images/index_bg.gif);
background-repeat: repeat-x;
background-attachment: fixed;
font-family: Times New Roman, Times,serif;
}

/* font */
p {
font-family: Times New Roman, Times,serif;
font-size: 12px;
font-weight: bold;
color: #577993;
}

/* links */
a {
color: #7d98ad;
font-size: 11px;
text-decoration: none;
}
a:hover {
color: #000000;
}

/* css table */
#wrapper {
width: 683px;
margin: 0 auto;
padding: 5px;
overflow: hidden;

}
/* sidebar */
.sidebar {
background-image: url(images/cabinetry/sidebar.gif);
background-repeat: no-repeat;
width: 149px;
height: 850px;
float: left;
margin-top: 5px;

}
/* side links */
.sidebar ul {
width: 120px;
border-left: 1px dotted white;
margin: 15px 0 0 15px;
height: 800px;
}
.sidebar li {
list-style: none;
}
.sidebar .first {
font-size: 11px;
padding-top: 10px;
border-top: 1px dotted white; margin-top: 18px;
}
.sidebar a {
color: #FFFFFF;
text-align: right;
font-size: 9px;
font-weight: bold;
line-height: 15px;
text-decoration: none;
width: 120px;
display: block;
}
.sidebar a:hover {
color: #000000;
}
.sidebar h2 {
display: block;
font-size: 1px;
text-indent: -1000px;
height: 10px;
}

/* top navigation */

.topmenu {
height: 36px;
overflow: hidden;
}
.topmenu ul {
margin: 20px 0 0 225px;
float: left;
display: inline;
}
.topmenu li {
float:left;
list-style: none;
display: inline;
}
.topmenu .whiteline {
border-left: 1px dotted white;
}
.topmenu a {
color: #FFFFFF;
font-size: 12px;
text-decoration: none;
display: block;
padding: 0 5px;
line-height: 16px;
}
.topmenu a:hover {
color: #000000;
}
.topmenu h1 a {
float: left;
width: 145px;
height: 36px;
background-image: url(images/logo.png);
background-repeat: no-repeat;
font-size: 1px;
margin-left: 149px;
display: inline;
text-indent: -1000px;
}


/* Middle Background */

.middlebg {
background-image: url(images/cabinetry/Cottage3/middlebg.gif);
background-repeat: no-repeat;
height: 770px;
margin: 5px 0 0 150px;
padding: 20px 5px 0;
}

/* Product Image */

.middlebg .product img {
float:left;
margin: 15px 20px 0 8px;
overflow: hidden;
}

/* product description */

.middlebg .product ul {
display: block;
margin-top: 20px;
padding-top: 10px;
}

.middlebg .product li {
list-style: square;
font-family: Times New Roman, Times,serif;
text-align: left;
line-height: 20px;
font-size: 12px;
color: #01263a;
}
.middlebg .product a {
font-size: 12px;
text-decoration: underline;
color: #01263a;
}
.middlebg .product a:hover {
color: #ffffff;
}


* bottom thumbnails section */
.middlebg .botthumb {
display: block;
}
.middlebg .botthumb ul {
overflow: hidden;
margin: 40px 0 10px 8px;
}

.middlebg .botthumb li {
list-style: none;
display: inline;
float: left;
margin: 0 5px 0 0;
}

.middlebg .botthumb a {
width: 106px;
height: 20px;
text-align: center;
display: block;
padding-top: 70px;
}

/* bottom section */
.botmenu {
overflow: hidden;
}
.botmenu ul {
display: inline;
float: right;
}
.botmenu li {
list-style: none;
display: inline;
}
.botmenu .whiteline {
border-left: 1px dotted #606a74;
}
.botmenu a {
color: #606a74;
font-size: 12px;
text-decoration: none;
padding: 0 5px;
line-height: 15px;
}
.botmenu a:hover {
color: #000000;
}
.botmenu h5 a {
width: 110px;
height: 27px;
background-image: url(images/logo_bottom.gif);
background-repeat: no-repeat;
background-position: center;
font-size: 1px;
margin-top: 5px;
text-indent: -1000px;
float: right;
clear: right;
border-bottom: 1px dotted #606a74;
border-top: 1px dotted #606a74;
padding: 5px 10px;

}
.botmenu p
{
margin-top: 5px;
text-align: left;
font-family: Times New Roman, Times,serif;
font-size: 11px;
color:#606a74;
float: right;
clear: right;
}

Centauri
06-05-2007, 05:29 PM
You forgot to clear the floated image which I mentioned ealier. Here are a few changes to your css which should work. /* Product */

.middlebg .product {
overflow: hidden;
margin: 10px 0 0;
}
/* Product Image */

.middlebg .product img {
float:left;
margin: 15px 20px 0 8px;
}

/* product description */

.middlebg .product ul {
display: block;
}

.middlebg .product li {
list-style: square;
font-family: Times New Roman, Times,serif;
text-align: left;
ine-height: 20px;
font-size: 12px;
color: #01263a;
}
.middlebg .product a {
font-size: 12px;
text-decoration: underline;
color: #01263a;
}
.middlebg .product a:hover {
color: #ffffff;
}


* bottom thumbnails section */
.middlebg .botthumb {
}
.middlebg .botthumb ul {
overflow: hidden;
margin: 10px 0 10px 8px;
}
Changes are in red - also got rid of top margin and padding from .product ul

Cheers
Graeme

wanttea
06-05-2007, 07:30 PM
Thanks Centauri!

The reason why I included the top margin and padding for .product ul is because the top of the list is not aligned with the top of the image and is too close to the heading (Cottage III polar white...). There is already a margin for .product so I don't understand why it created the margin for img but not for ul.

Cheers! Got beer?

Centauri
06-05-2007, 08:04 PM
The main reason I played with the margins was because if the text is significantly longer than the image (which it was on one of the pages), the text will wrap under the image (due to normal action of float wraps) and nudging the image down a little stopped that. Thinking about it now, a left margin on the <ul> equal to image width will also stop that as long as each product image was the same width.

uhhhhh, b e e r (spoken in a voice that sounds like Homer Simpson) :)

wanttea
06-05-2007, 08:20 PM
Hey you watch Homer? You know there is gonna be a movie coming out soon?

wanttea
06-05-2007, 08:22 PM
http://www.simpsonsmovie.com/#