•
•
•
•
What is DaniWeb IT Discussion Community?
You're currently browsing the HTML and CSS section within the Web Development category of DaniWeb, a massive community of 402,454 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 2,906 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our HTML and CSS advertiser: Lunarpages Web Hosting
Views: 2810 | Replies: 1 | Solved
![]() |
•
•
Join Date: Jan 2006
Location: Land of Hope & Glory
Posts: 88
Reputation:
Rep Power: 3
Solved Threads: 0
I'm trying to add a gradient I made as a background to my "centerContent", so it acts as a shadow to the border of "centerContent".
I'm using CSS's z-index property to get the desired result, but am not having this "content-shadow" image displaying on my page, at all. There may be other way of achieving the same, but z-index seems little easy to understand, so I'll stick with z-index for now.
The related CSS is:
while my HTML is:
My website in itself can be seen on (please refresh the page, if :
http://darsh25.silverserve.co.uk/All...gn/contact.php
While all the files can be seen on:
http://darsh25.silverserve.co.uk/AllInclusiveWebDesign/
My desired result can be seen at: http://www.tristarwebdesign.co.uk/
Am I not doing things in the way I should've been doing ???
I'm using CSS's z-index property to get the desired result, but am not having this "content-shadow" image displaying on my page, at all. There may be other way of achieving the same, but z-index seems little easy to understand, so I'll stick with z-index for now.
The related CSS is:
.centerContentShadow
{
background-image:url(content-shadow.jpg);
background-repeat:repeat-y;
width:800px;
z-index:-1;
}
#centerContent
{
background-image:url(contentbackground.jpg);
width:700px;
margin-left:45px;
float:left;
border-left:1px solid #999999;
border-right:1px solid #999999;
}while my HTML is:
<div class="centerContentShadow" id="centerContent">
My website in itself can be seen on (please refresh the page, if :
http://darsh25.silverserve.co.uk/All...gn/contact.php
While all the files can be seen on:
http://darsh25.silverserve.co.uk/AllInclusiveWebDesign/
My desired result can be seen at: http://www.tristarwebdesign.co.uk/
Am I not doing things in the way I should've been doing ???
Nope, I'm NOT God, but I'm British (which is the next best thing ;)
Rather that starting a new thread for each question, could you keep all related posts within the same thread?
Many CSS elements, such as z-index, and floats, take on their "rendered meaning" based on associated (in terms of the document hierarchy) elements.
In other words, if you're going to z-index one element, you should z-index all elements.
Your example page isn't really helpful, because all they are doing is placing standard images within divs... no fancy tricks going on.
Many CSS elements, such as z-index, and floats, take on their "rendered meaning" based on associated (in terms of the document hierarchy) elements.
In other words, if you're going to z-index one element, you should z-index all elements.
Your example page isn't really helpful, because all they are doing is placing standard images within divs... no fancy tricks going on.
![]() |
•
•
•
•
•
•
•
•
DaniWeb HTML and CSS Marketplace
•
•
•
•
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
- Background image? Z-Index? (HTML and CSS)
- Page Shadow, Help Needed! (HTML and CSS)
- CSS - strech a background image? (Site Layout and Usability)
- Trouble with absolute positioning in CSS (HTML and CSS)
- CSS Layout Coding ??? (HTML and CSS)
Other Threads in the HTML and CSS Forum
- Previous Thread: CSS Border's Shadow ???
- Next Thread: Different Text Display in Different Browser ???



Linear Mode