473,406 Members | 2,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,406 software developers and data experts.

HOw to make z-index -1 clickable?

nathj
938 Expert 512MB
Hi,

I'm working on my own site - a long overdue project and I have come up with a design I'm really happy with. However, the design has a torn edge look at the bottom of the header with three tabs coming out from it.

Expand|Select|Wrap|Line Numbers
  1. div.header 
  2. {
  3.     width                        : 100%;
  4.     margin-left                : auto;
  5.     margin-right            : auto; 
  6.     margin-top                : 0px;
  7. }
  8.     div.header a.logo
  9.     {
  10.         display                    : block;    
  11.         height                    : 102px;    
  12.         width                        : 100%;
  13.         margin-left                : auto;
  14.         margin-right            : auto; 
  15.         margin-top                : 0px;        
  16.         background-image        : url("../images/njd_logo.png");
  17.  
  18.         background-repeat        : no-repeat;    
  19.  
  20.         background-position    : left;
  21.     }
  22.  
  23. /* 2.2 Navigation layout */
  24.  
  25.     div.navigation
  26.     {
  27.         position                    : relative;    
  28.         width                        : 50%;    
  29.         float                        : right;
  30.         height                    : 75px;
  31.         top                        : -40px;
  32.         z-index                    : -1;
  33.     }
  34.         div.navigation ul
  35.         {
  36.             display                    : inline;    
  37.             float                        : right;
  38.             margin-right            : 25px;
  39.         }
  40.  
  41.         div.navigation li
  42.         {
  43.                 display                : inline;
  44.                 list-style            : none;
  45.                 margin-right        : 10px;
  46.         }
  47.  
This css does the trick perfectly for making it look right.

The trouble I have is that the li items need to be clickable.
Expand|Select|Wrap|Line Numbers
  1. <div class="header">    
  2.             <?=anchor("nathanjamesdavies/"," ","title='return home' class='logo'")?>
  3.                 <div class="navigation">
  4.                     <ul>
  5.                         <li><?=anchor("nathanjamesdavies/project/1", "<img src='/../images/webdev_link.png' title='web&ndash;dev' alt='web&ndash;dev'/>", "title='web&ndash;dev'")?></li>
  6.                         <li><?=anchor("nathanjamesdavies/project/2", "<img src='/../images/appdev_link.png' title='app&ndash;dev' alt='app&ndash;dev'/>", "title='app&ndash;dev'")?></li>
  7.                         <li><?=anchor("nathanjamesdavies/project/3", "<img src='/../images/ticktock_link.png' title='tick&ndash;tock' alt='tick&ndash;tock'/>", "title='tick&ndash;tock'")?></li>
  8.                     </ul>    
  9.                 </div>    
  10.             </div>
  11.  
That's the code in the header file to achieve it and I have played around with stack order, z-index, background images for ages but I cannot make those links clickable.

(I'm using CodeIgniter hence the anchor function). I could really do with some help getting this to layout and function as I want. It's proving to be a real pain.

Thanks
nathj
Feb 10 '11 #1
1 3130
nathj
938 Expert 512MB
Hi,

Ok, I've solved it with an extra level. So over the top of the navigation items I've layered a set of equal sized transparent png's. these images are clickable and the site now looks and functions as expected.

I can't help but think this is a nasty hack but it does work. If anyone has any better solutions please let me know.

For reference here is the code, css first:
Expand|Select|Wrap|Line Numbers
  1. div.navigation
  2.     {
  3.         position                    : relative;    
  4.         width                        : 50%;    
  5.         float                        : right;
  6.         height                    : 75px;
  7.         top                        : -40px;
  8.         z-index                    : -1;
  9.     }
  10.  
  11.         div.navigation ul
  12.         {
  13.             display                    : inline;    
  14.             float                        : right;
  15.             margin-right            : 25px;
  16.         }
  17.  
  18.         div.navigation li
  19.         {
  20.                 display                : inline;
  21.                 list-style            : none;
  22.                 margin-right        : 10px;
  23.         }
  24.  
  25.     div.navigationtransparent
  26.     {
  27.         position                    : relative;    
  28.         width                        : 100%;    
  29.         float                        : right;
  30.         height                    : 75px;
  31.         top                        : -115px;
  32.     }
  33.  
  34.             div.navigationtransparent ul.transparent
  35.             {
  36.                 display                    : inline;    
  37.                 float                        : right;
  38.                 margin-right            : 25px;
  39.             }
  40.  
  41.             div.navigationtransparent li.transparent
  42.             {
  43.                     display                : inline;
  44.                     list-style            : none;
  45.                     margin-right        : 10px;
  46.             }
  47.  
now the markup
Expand|Select|Wrap|Line Numbers
  1. <div class="header">    
  2.             <?=anchor("nathanjamesdavies/"," ","title='return home' class='logo'")?>
  3.                 <div class="navigation">
  4.                     <ul>
  5.                         <li><img src='/../images/webdev_link.png' title='web&ndash;dev' alt='web&ndash;dev'/></li>
  6.                         <li><img src='/../images/appdev_link.png' title='app&ndash;dev' alt='app&ndash;dev'/></li>
  7.                         <li><img src='/../images/ticktock_link.png' title='tick&ndash;tock' alt='tick&ndash;tock'/></li>
  8.                     </ul>    
  9.                 </div>    
  10.                 <div class="navigationtransparent">
  11.                     <ul class="transparent">
  12.                         <li class="transparent"><?=anchor("nathanjamesdavies/project/1", "<img src='/../images/webdev_link_transparent.png' title='web&ndash;dev' alt='web&ndash;dev'/>", "title='web&ndash;dev'")?></li>
  13.                         <li class="transparent"><?=anchor("nathanjamesdavies/project/2", "<img src='/../images/appdev_link_transparent.png' title='app&ndash;dev' alt='app&ndash;dev'/>", "title='app&ndash;dev'")?></li>
  14.                         <li class="transparent"><?=anchor("nathanjamesdavies/project/3", "<img src='/../images/ticktock_link_transparent.png' title='tick&ndash;tock' alt='tick&ndash;tock'/>", "title='tick&ndash;tock'")?></li>
  15.                     </ul>    
  16.                 </div>    
  17.             </div>
  18.  
Like I say if you know a better, neater or nicer way of doing this then please let me know.

Cheers
nathj
Feb 10 '11 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Robert Blaha | last post by:
Hi, I'm runnig Linux/Mandrake9.0-Dolphin and try to update Apache 2.0.46 and PHP 4.3.2. Apache is OK bu with PHP I've problem. I unpacked distribution, run ../configure > configure.vysl, make...
0
by: Mairhtin O'Feannag | last post by:
I have done a make, and a make install on the 4.3.6 version, using /usr/local/etc/php as the directory I make from. However, no matter what I do, I do not see a php4lib.so that has been created. ...
7
by: WindAndWaves | last post by:
Hi Gurus I am keen to make a search page on a website, but I have absolutely zero experience with PHP. I am going to hire an expert, but I thought that it may pay to try it a bit first myself...
28
by: AK | last post by:
Hi, I recently read an advice here that one should try to use make and version control system even if you're the only one working on the program. Is that a good advice? How many of you do that? ...
0
by: pptran | last post by:
Hi, I am pretty new to building and installing Perl. Can someone help explain the severity of the following Perl 5.8.4 build error message? ==================================================...
8
by: Seeker | last post by:
Hello, In using Solaris Pro Compiler to compile Pro*C code. I am getting this error: make: Fatal error in reader: parser_proc_online.mk, line 26: Badly formed macro assignment Based on other...
28
by: Steven Bethard | last post by:
Ok, I finally have a PEP number. Here's the most updated version of the "make" statement PEP. I'll be posting it shortly to python-dev. Thanks again for the previous discussion and suggestions!...
7
by: Steven Bethard | last post by:
I've updated PEP 359 with a bunch of the recent suggestions. The patch is available at: http://bugs.python.org/1472459 and I've pasted the full text below. I've tried to be more explicit about...
10
by: Johs | last post by:
I have a source file called project.c. In the same folder I have a Makefile containing: CC=gcc CFLAGS=-g project: project.c $(CC) $(CFLAGS) project.c -o project
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.