Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Making Shadows Without Images
cragllo
post Aug 7 2005, 01:19 PM
Post #1


Sorry for not being active, Uni :(
*********

Group: Members
Posts: 933
Joined: 24-August 04
From: South Wales, UK
Member No.: 892



Im going to show you very simply how to create boxes with Shadows using div tags and css, no images needed, meaning fat pageload times! biggrin.gif

You simple need to create two layers, one behind the other, the one behind will have a top and left margin on 20px, the one infront 10px, set teh background colour of the one behing darker than teh one infront, you should end up with something like this:
user posted image

Here is th html to create this effect:
CODE
<div id="Layer1" style="position:absolute; left:15px; top:15px; width:400px; height:200px; z-index:1; background-color: #000066; layer-background-color: #000066; border: 1px solid #000000;"></div>
<div id="Layer2" style="position:absolute; left:10px; top:10px; width:400px; height:200px; z-index:2; background-color: #0099FF; layer-background-color: #0099FF; border: 1px solid #000000;"></div>

Its as simple as that, two divtags, a bit of css, no images smile.gif

This post has been edited by OpaQue: Aug 7 2005, 08:43 PM
Go to the top of the page
 
+Quote Post
rvovk
post Aug 7 2005, 01:33 PM
Post #2


Super Member
*********

Group: Members
Posts: 378
Joined: 13-October 04
From: Slovenia
Member No.: 1,731



Nice one wink.gif
Go to the top of the page
 
+Quote Post
Dragonfly
post Aug 7 2005, 08:35 PM
Post #3


Privileged Member
*********

Group: Members
Posts: 702
Joined: 17-February 05
Member No.: 3,817



Really cool. Somewhere in someone's webpage I saw something like this when I tried to right-click no images was coming and I was wondering how he did it. Thanks for sharing it here.

Keep sharing those with us. biggrin.gif I don't mind it seeing more of those. Very nice tutorial.
Go to the top of the page
 
+Quote Post
Adamrosso
post Aug 7 2005, 08:38 PM
Post #4


Advanced Member
*******

Group: Members
Posts: 128
Joined: 6-August 05
Member No.: 10,402



wow, thats nicely done =D. I never knew with such simple CSS coding you could get such a good outcome
Go to the top of the page
 
+Quote Post
Tyssen
post Aug 7 2005, 09:58 PM
Post #5



***********

Group: Members
Posts: 1,161
Joined: 9-May 05
From: Brisbane, QLD
Member No.: 6,818



QUOTE(cragllo @ Aug 7 2005, 11:19 PM)
CODE
<div id="Layer1" style="position:absolute; left:15px; top:15px; width:400px; height:200px; z-index:1; background-color: #000066; layer-background-color: #000066; border: 1px solid #000000;"></div>
<div id="Layer2" style="position:absolute; left:10px; top:10px; width:400px; height:200px; z-index:2; background-color: #0099FF; layer-background-color: #0099FF; border: 1px solid #000000;"></div>


One flaw with this method is that you've given absolute positioning to your first element. You can achieve the same result without absolutely positioning your first element like this:

CODE
<div id="Layer1" style="width:400px; height:200px; z-index:1; background-color: #000066; layer-background-color: #000066; border: 1px solid #000000;">
<div id="Layer2" style="position:absolute; left:5px; top:10px; width:400px; height:200px; z-index:2; background-color: #0099FF; layer-background-color: #0099FF; border: 1px solid #000000;"></div></div>

The second <div> is positioned absolutely in relation to the first (ie it's inside the first div).
I've just posted this in another thread, but it seems relevant to this one too: CSS dropshadows (with feathered edges).
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Making A Website(6)
  2. Extending The Image Preloader With Php4(3)
  3. How To Resize/host Images!(15)
  4. How To: Hide The Real Url Of Your Images(26)
  5. Making A Webserver Directory Listing(6)
  6. Writing On Images(2)
  7. Tutorial: Installing D-shoutbox For Ipb V1.2(12)
  8. Making Winrar Archives(12)
  9. Making And Editing A New Ipb V1.2 Skin(0)
  10. How To: Make A Simple Php Site(21)
  11. Blending Patterns Onto Images(2)
  12. Uploading Images To The Trap17 Gallery(4)
  13. Making Interactive Cds With Flash(2)
  14. Making A Dynamic Page On Blogspot(5)
  15. Making The Popular Id Browsing For Your Site.(17)
  1. Making a java based program(3)
  2. Making A One Page Does All Website In Phph(2)
  3. Creating A Resume(1)
  4. Uploading Images To Phpbb Galleries(0)
  5. Making A Song In Fruity Loops Part 2(0)
  6. Making A Song In Fruity Loops Part Three(1)
  7. Ftp In Visual Basic 6.0(0)
  8. How To Make An Ultimate Game List.(0)
  9. Making Calculators with PHP(4)


 



- Lo-Fi Version Time is now: 25th July 2008 - 10:43 AM