Go Premium for a chance to win a PS4. Enter to Win


CSS z-index quandary

Posted on 2014-11-29
Medium Priority
Last Modified: 2014-12-13

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.


Question by:billium99
LVL 53

Assisted Solution

COBOLdinosaur earned 400 total points
ID: 40471847
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.

LVL 54

Accepted Solution

Scott Fell,  EE MVE earned 1600 total points
ID: 40471887
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

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

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction A frequently asked question goes something like this:  "I am running a long process in the background and I want to alert my client when the process finishes.  How can I send a message to the browser?"  Unfortunately, the short answer…
This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
In this Micro Tutorial users will learn how to embed custom fonts into websites using @font-face in CSS Select a font: Ensure the EULA allows you to use @font-face: Download the font: Get the browser-compatible files you need: Edit your CSS       - Name …
In this tutorial viewers will learn how to embed custom externally-hosted Google Fonts using the Google Font API in CSS Go to the Google Fonts website at google.com/fonts: Browse or search based on font properties or name to find a suitable font for…
Suggested Courses

886 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question