Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 111
  • Last Modified:

CSS z-index quandary


I have a client website https://www.seleneriverpress.com

Currently, on the home page only, the logo that appears in the upper left corner, disappears after the slideshow (?) loads as if I have a layering problem. This started happening when I messed with the z-index of the tiny shopping cart widget at the upper right corner. However on every other page of the site, everything works correctly in the right layers. Only the home page doesn't like what did, but I can't seem to find a remedy that will leave the other layers intact. Anything I've tried is then dropping the cart under the menu when you expand the cart box.

Any ideas what is going on? I know the css on this site is a mess. So much for Rockettheme/Joomla templates, but I'm so close to having it all working correctly, I'd really appreciate any suggestion to get that logo to pop above all other layers.


2 Solutions
The page is so badly broken that it is virtually impossible to determine what rules are actually being applied to a given element.

The page does not come close to validating.  The HTML validator reports 78 errors and most of the errors are serious structure problems that leave the page about as stable as quicksand.

I suspect the problem is not actually with the CSS, but the broken structure that leaves the parser in the browser guessing what the actual element hierarchy is supposed to be.  Combine that with the excessive scripting and incomprehensible CSS and trying to do meaningful diagnostics is impossible because the Document Object is scrambled and the hooks could be anywhere.

I suggest you start by cleaning up the markup so it is valid and that may solve the problem, if it is a simple inability if the parser to understand structure through the errors.  If that does not work then the problem will almost certainly be caused by one of the scripts applying and incorrect class or inserting content that overrides the correct cascade.  The best way to find which script is at fault is to disable one at a time to see which one not running solves the problem, then go through that code and find the offending line of code that you will need to change.

Scott Fell, EE MVEDeveloper & EE ModeratorCommented:
Cd& is right on target.  Before you address anything else, clean up the coding with the validator. Then let's take a look at it.  In cleaning up the code, you may find other errors or that could be the fix.  When you are relying on jquery/javascript it can get messed up or not even work when things are not valid.  

As example, the slider has the code
… disease isn’t <br />germs, genes, or toxins.<h3>It's malnutrition.</h3></span>

Open in new window

Your h3 tag should not be enclosed by a span.  You can try closing the span prior to the h3.  You may need to update the css to target the h3 inside the slider though if the font no longer matches.
… disease isn’t <br />germs, genes, or toxins.</span><h3>It's malnutrition.</h3>

Open in new window

When I looked at the theme http://demo.rockettheme.com/live/joomla/cerulean/, it has a couple of minor errors to start, but not the same that your client's page is showing.

Some of these themes tend to use <h> tags for styling.   For SEO, you want to make sure that is not the case.   The coding semantics of your page should read like a highschool term paper.  A main topic sentence (the h1 tag) and several supporting sub topic sentences (h2) tags that each have some paragraphs(p tags) of content.  Inside of an h2 tag, you can have an h3 tag, but you wouldn't want to have an h3 tag at the same level as an h2 tag.
<h1>Dogs Rule</h1>
<h2>Unconditional Love</h2>
<p>blah blah blah blah</p>
<p>blah blah blah blah</p>
<p>blah blah blah blah</p>

<p>blah blah blah blah</p>
<p>blah blah blah blah</p>
<p>blah blah blah blah</p>

<h2>No Liter Box</h2>
<p>blah blah blah blah</p>
<p>blah blah blah blah</p>
<p>blah blah blah blah</p>

Open in new window


Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now