Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Alignment of end cell in nav bar

Status
Not open for further replies.

jj1234

MIS
Jan 27, 2006
46
GB
I am trying to work out how to get the end cell in the nav bar (contact) so that it aligns with the right hand side in both the forum and guestbook.
I have tried but simply cannot get it to work.







css:




html, body {
margin:0;
padding:0;
}
body {
font-family:"lucida sans unicode",verdana,sans-serif;
font-size:12px;
color:#333;
background-color:#e9eef4;
}
#wrapper {
text-align:left;
border:1px solid #66635c;
margin:5px auto;
width:761px;
background-repeat:repeat-y;
}

#header {
background-image:url(background-repeat:no-repeat;
height:107px;
}
a:link {
color:blue;
background-color:inherit;
text-decoration:none;
}
a:visited {
colorurple;
text-decoration:none;
}
a:hover {
color:red;
background-color:inherit;
}
a:active {
color:red;
background-color:inherit;
}
#content {
color:#000;
background-color:#fff;
}
#content p {
margin:0 60px 9px 10px;
font-family:verdana,arial,helvetica,sans-serif;
}


h1 {
font-family:"lucida sans unicode",verdana,sans-serif;
font-size:17px;
text-align:center;
padding-top:2px;
padding-bottom:0px;
margin-top:0;
}

.italic {font-style:italic}

p{line-height: 1.8em; }

#image_container {
margin:35px 0 25px 0;
text-align:center;
}

#navcontainer {
margin-top:0;
}
#navcontainer ul {
list-style:none;
margin:0 0 0 0px; /* adjust left margin to suit */
padding:0;
text-align:center;
}
#navcontainer li {
display:block;
float:left;
}
#navcontainer li a {
border-right:#84979c 1px solid;
border-top:#84979c 1px solid;
border-bottom:#84979c 1px solid;
display:block;
background-color:#deffff;
width:94px;
color:#444;
text-decoration:none;
text-align:center;
padding-top:2px;
padding-bottom:2px;
}

#navcontainer .last {

BORDER-RIGHT: none;

WIDTH: 96px;

overflow: hidden;

}
#navcontainer ul li a:hover {
color:#000;
background-color:#fcc;
}
#navcontainer a:active {
background-color:#ffecd2;
color:#fff;
}

#footerhome {
font-family:"lucida sans unicode",verdana,sans-serif;
font-size:10px;
border-top:1px solid #000;
text-align:center;
margin:60px 0px 0px 0px;
padding:6px 0px 5px 0px;
}

#footer {
font-family:"lucida sans unicode",verdana,sans-serif;
font-size:1px;
color:#ffffff;
text-align:center;
margin:4px 0px 0px 0px;
padding:2px 0px 0px 0px;
}
 
Phew, that's one weird set of pages. You have a class called last that you apply to the last element in the list, and that makes it expand all the way to the end. All nice and fine, works on all pages. On the Calendar, Guestbook and Forum however you're applying the id called last to define the last element in the list. This works nicely on the Calendar page, which uses a completely different stylesheet (main.css) than the rest of the pages (amigos_style.css). In main.css #last is defined and in the other stylesheet (used by the Guestbook and Forum) it is not, so the last element has no special styling. Incidentally, the additional stylesheet on Guestbook makes the font a differet type and size. What is the solution? I don't know, standardize?
 
I resolved the issue by putting #last in instead of .last.

Thanks for your assistance.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top