Disappearing linked image [SOLVED]

For discussion and questions related to CMS Specific templates and stylesheets (CSS), and themes. or layout issues. This is not a place for generic "I don't know CSS issues"
Locked
sieg23

Disappearing linked image [SOLVED]

Post by sieg23 »

As you will be able to tell by the stylesheet, I'm a bit of hack still.  But learning.

The problem: After clicking on my linked image and returning to my site, and refreshing, the image disappears.  I think it must be a conflicting "a:visited" directive, but I can't find it.

www.chowmaineguide.com

Please use  UN=chow and PW=chowne  to access site in progress...

I'm using a global content block (called 'amazon') to place an image above my left CSS vertical menu, and applying a link beneath it to open a new site in a new browser window.  I'm doing it this way so that my client can change the image or the link easily at some later date.  The content block looks like this:
My style sheet, an edited version of the CMS stock "Layout: Left sidebar + 1 column" is here below:
/*****************
browsers interpret margin and padding a little differently,
we'll remove all default padding and margins and
set them later on
******************/
* {
margin:0;
padding:0;
}

/*
Set initial font styles
*/

body {
  text-align: left;
  font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
  font-size: 75.01%;
  line-height: 1em;
 
}

/*
set font size for all divs, this overrides some body rules
*/

div {
  font-size: 1em;
}

/* if img is inside "a" it would have borders, we don't want that */

img {
  border: 0;
}

/*default link styles*/

/* set all links to have no underline */

a,
a:link
a:active {
  text-decoration: none    /*no underline;*/

    /* css validation will give a warning if color is set without background color.
    this will explicitly tell this element to inherit bg colour from parent element */

  background-color: inherit;
  color: #385C72;            /* for some reason this changes the color of the prev/next links */
}

a:visited {
  text-decoration: none        /* underline;*/
/*  background-color: inherit;  this blanks out an image if left on...*/
  color:  #385C72;              /*  a different color can be used for visited links */
}

/* remove underline on hover and change color */
a:hover {
  text-decoration: none;
  background-color: inherit;
}


/*****************
basic layout
*****************/
body {
  background-color: #ccc;
  color: #333;
  margin:1em;    /* gives some air for the pagewrapper */
}

/* page wrapper, min max width */
div#pagewrapper {
  border: 1px solid black;
  margin: 0 auto;      /* this centers wrapper */
  max-width: 900px;  /* IE wont understand these, so we will use javascript magick */
  min-width: 700px;
  background-color: #fff;
/*  color: black;*/
}

/*** header ***
we will hide text and replace it with a image
we need to assign a height for it so that the image wont cut off
*/
div#header {
  height: 70px;          /* adjust according your image size */
  background: #FFFFFF;         
}

div#header h1 a {
  /* you can set your own image here */
  background: #FFFFFF url(images/cms/spine2.jpg) no-repeat 0 0px;
  display: block;
  height: 70px;            /* adjust according your image size */
  text-indent: -999em;  /* this hides the text */
  text-decoration:none; /* old firefox would have shown underline for the link, this explicitly hides it */
}

div#crawl {
  padding: .0 0 0 0;
  text-align: center;
  color: #0000FF;
  font-weight: bold;
}

div#crawl a{
  text-decoration: none;
  color: #0000FF;
}

div#crawl a:hover{
  color: #000000;
}

div.breadcrumbs {
  padding: .5em 0; /* CSS short hand rule first value is top then right, bottom and left */
  font-size: 80%;            /* its good to set fontsizes to be relative,
                                        this way viewer can change his/her fontsize */
  margin: 0 1em;              /* css shorthand rule will be opened to be "0 1em 0 1em" */
/*  border-bottom: 1px solid #ccc;*/
}

/*** main ***/

div#content {
  margin: 0.5em 0 2em 0;  /* some air above and under menu and content */
  color: #00000;
}

div#ad_bar {
  float: right;    /* set sidebar on the left side. Change to right to float it right instead. */
  width: 170px;    /* sidebar width, if you change this please also change #main margins */
  display: inline;  /* FIX IE double margin bug */
  padding: 0 0 5px 10px;
}

/* ***** remove  for now, and add later with "advertise here" contact
div#ad_premium {
  background: #FFFFFF url(images/cms/ad-1.jpg) no-repeat 0 0px;
  display: block;
  height: 170px;       
}
*/

div#adsense {
/*  background: #FFFFFF url(images/cms/sample-ads.gif) no-repeat 0 0px;*/
  display: block;
  height: 580px;            /* adjust according your image size */
}

div#main {
  margin-left: 200px;      /* this will give room for sidebar to be on the left side,
                                      make sure this space is bigger than sidebar width */
  margin-right: 180px;      /* and some air on the right */
}

div#printbutton {
float: right;
}

div#sidebar {
  float: left;    /* set sidebar on the left side. Change to right to float it right instead. */
  width: 185px;    /* sidebar width, if you change this please also change #main margins */
  display: inline;  /* FIX IE double margin bug */
  margin-left: 1;
  margin-bottom: 5px;
}

div#amazon {
/*  background: #FFFFFF;    */
  height: 50px;            /* adjust according your image size */
/*  text-decoration:none;  old firefox would have shown underline for the link, this explicitly hides it */
  margin-left: 1px;
}

div#amazon a:visted{
    text-decoration:none;
}

div#links {
  margin: 1em auto 1em 1em;
  font-size: 1.2em;
}

div#links a,a:link{
  text-decoration: none;
  color: 385C72;
}

div#links a:hover{
  text-decoration: none;
  color: #000000;
}

div#footer {
  clear: both;      /* keep footer below content and menu */
  color: #385C72;
  background-color: #FFF;
}

div#footer p {
  font-size: 0.8em;
  text-align: center;  /* centered text */
  margin: 0 0 1em 0;
}

div#footer p a {
  color: #000000; /* needed because footer link would be same color as background otherwise */
  text-decoration: none
}

/* as we hid all hr for accessibility we create new hr with extra div element */
div.hr {
  height: 1px;
  padding: 1em;
  border-bottom: 1px dotted black;
  margin: 1em;
}

/* relational links under content */
div.left49 {
  width: 49%; /* 50% for both left and right might lead to rounding error on some browser */
  font-size: 0.8em;

}

div.left49 a{
  text-decoration: none
}

div.right49 {
  float: right;
  width: 49%;
  font-size: 0.8em;
  text-align: right; 
}

div.right49 a{
  text-decoration: none
}



/********************
CONTENT STYLING
*********************/
div#content {}
/* HEADINGS */
div#content h1 {
  font-size: 2em; /* font size for h1 */
  line-height: 1em;
  margin: 0;
}


div#content h2 {
color: #294B5F;
font-size: 1.6em;
text-align: left;
/* some air around the text */
padding: 0.7em 0 0.6em 0.5em;
/* set borders around header */
border-bottom: 1px solid #CC0033;
border-left: .5em solid #CC0033;
        line-height: 1em;
/* and some air under the border */
        margin: 0 0 0.5em 0;

}
div#content h3 {
  color: #294B5F;
  font-size: 1.1em;
  line-height: 3em;
  margin: 0 0 0 0;
}

/* address style*/
div#content h4 {
  color: #000000; /*294B5F; */
  font-size: 1em;
  line-height: 1.1em;
  margin: 0 0 0 0;
}

/* style for restaurant highlights, bullets (without the bullets) */
div#content h5 {
  color: #294B5F;
  font-size: 1em;
  line-height: 1.1em;
  margin: 0 0 0.45em 0;
}

/* heading for menu */
div#content h6 {  /* heading for menu */
color: #FFFFFF;
font-size: 1.1em;
text-align: center;
/* some air around the text */
padding-left: 0.1em;
padding-bottom: 5px;
padding-top: 5px;
/* set borders around header */
border-bottom: 1px solid #CC0033;
border-top: 1px solid #CC0033;
border-left: 1px solid #CC0033;
border-right: 1px solid #CC0033;
        background-color: #CC0033;
/*        line-height: 1em;*/
/* and some air under the border */
        margin: 1em 0 0.5em 0;
}
/* END HEADINGS */

/* TEXT */
p {
  font-size: 1em;
  margin: 0 0 1.5em 0; /* some air around p elements */
  line-height: 1.4em;
  padding: 0;
}

blockquote {
  border-left: 10px solid #ddd;
  margin-left: 10px;
}
strong, b {
/* explicit setting for these */
  font-weight: bold;
}
em, i {
/* explicit setting for these */
  font-style:italic;
}

/* Wrapping text in tags. Makes CSS not validate */
code, pre {
white-space: pre-wrap;      /* css-3 */
white-space: -moz-pre-wrap;  /* Mozilla, since 1999 */
white-space: -pre-wrap;      /* Opera 4-6 */
white-space: -o-pre-wrap;    /* Opera 7 */
word-wrap: break-word;      /* Internet Explorer 5.5+ */
font-family: "Courier New", Courier, monospace;
font-size: 1em;
}

pre {
  border: 1px solid #000;  /* black border for pre blocks */
  background-color: #ddd;
  margin: 0 1em 1em 1em;
  padding: 0.5em;
  line-height: 1.5em;
  font-size: 90%;


}

/* Separating the divs on the template explanation page, with some bottom-border */
div.templatecode {
  margin: 0 0 2.5em;
}

/* END TEXT */

/* LISTS */
/* lists in content need some margins to look nice */
div#main ul,
div#main ol,
div#main dl {
  font-size: 1.0em;
  line-height: 1.4em;
  margin: 0 0 1.5em 1em;
  text-decoration: none;
  color: #FFFFFF;
}

div#main ul li a,
div#main ol li {
    margin: 0 0 0.25em 0;
    text-decoration: none;
}

/* definition lists topics on bold */
div#main dl dt {
  font-weight: bold;
  margin: 0 0 0 1em;
}
div#main dl dd {
  margin: 0 0 1em 1em;
}

div#main dl {
  margin-bottom: 2em;
  padding-bottom: 1em;
  border-bottom: 1px solid #c0c0c0;
}

/*div#bulletmenu ul li {
  font-size: 1.0em;
  line-height: 1.4em;
  margin: 0 0 1.5em 1em;
*/

}

/* END LISTS */
Any help would be much appreciated. 

Thanks! 
~sieg
Last edited by sieg23 on Wed Mar 14, 2007 1:26 pm, edited 1 time in total.
heatherfeuer

Re: Disappearing linked image

Post by heatherfeuer »

Tried to access the site, but it wanted user name and password for members only.
sieg23

Re: Disappearing linked image

Post by sieg23 »

User Name = chow, PW = chowne

ought to get you in.  I'll have to keep authentication until it's complete.

Thanks
RonnyK
Support Guru
Support Guru
Posts: 4962
Joined: Wed Oct 25, 2006 8:29 pm

Re: Disappearing linked image

Post by RonnyK »

sieg23,

I don't see the image dissappear (at least not in IE6). I do notice that your header reacts "on hover", but the link-image is still visible above the menu.

Ronny
sieg23

Re: Disappearing linked image

Post by sieg23 »

Thanks very much for the feedback - very helpful.

It's so strange that the image disappears for me on both Firefox2 and IE6 (on WinXP SP2), but not for anyone else, as yet.  Mac Safari seems solid, and an older version of XP w/IE6 also is working for my neighbor.  I don't get the header reaction on my browsers, but I'll try adding the 'height: 1%;' fix I've read about to treat this issue.

thanks again ~S
sieg23

Re: Disappearing linked image [SOLVED]

Post by sieg23 »

For some reason, Zone Alarm 7 doesn't want to show my visited linked image.  I've recently upgraded ZA and am finding that it fiddles with certain behaviors of certain programs.

~S
Locked

Return to “Layout and Design (CSS & HTML)”