943,172 Members | Top Members by Rank

Ad:
Sep 1st, 2010
0

Css Positioning

Expand Post »
This is what I want my outcome to look like http://teh-shepherd.webege.com/

Tried changing to css, but i cant get positioning done right
HTML and CSS Syntax (Toggle Plain Text)
  1. <div id="nofade" align="center">
  2. <b>block 1</b>
  3. </div>
  4. <div id="fade80">
  5. </div>
  6. <div id="nofade" align="center">
  7. <b>block 2</b>
  8. </div>
  9. <div id="fade40">
  10. </div>

HTML and CSS Syntax (Toggle Plain Text)
  1. #nofade {
  2. position:static;
  3. background-color:transparent;
  4. position:absolute;
  5. z-index:3;
  6. }
  7.  
  8. #fade40 {
  9. position: absolute;
  10. top: 50%;
  11. left: 0;
  12. padding: 10px;
  13. background-color:#000000;
  14. opacity:0.4;
  15. filter:alpha(opacity=40);
  16. z-index:2;
  17.  
  18. }
  19.  
  20. #fade80 {
  21. position: absolute;
  22. top: 50%;
  23. left: 0;
  24. padding: 10px;
  25. Width:100%; height:20%;
  26. background-color:#000000;
  27. opacity:0.4;
  28. filter:alpha(opacity=40);
  29. z-index:2;
  30. }
thats what i have, any input would be appreciated
Last edited by NickRx; Sep 1st, 2010 at 3:51 pm.
Similar Threads
Reputation Points: 10
Solved Threads: 0
Newbie Poster
NickRx is offline Offline
14 posts
since Jan 2010
Sep 2nd, 2010
0
Re: Css Positioning
Let me guess, the vertical positioning is the hard part?

I would recommend using javascript. Here is a simple jquery plugin that should do it for you.
Reputation Points: 46
Solved Threads: 48
Posting Pro in Training
macneato is offline Offline
410 posts
since Jun 2007
Sep 3rd, 2010
0
Re: Css Positioning
Nah I got the vertical position done with css, the part I'm having trouble with is placing the divs like tables to make a box, I'm new to using just divs and no tables
Reputation Points: 10
Solved Threads: 0
Newbie Poster
NickRx is offline Offline
14 posts
since Jan 2010
Sep 4th, 2010
1

CSS and DIV

I am not entirely sure what you are asking for, but i'm assuming this code will help. Hope it works

CSS:
HTML and CSS Syntax (Toggle Plain Text)
  1. <style>
  2. html, body {
  3. width: 100%;
  4. height: 100%;
  5. margin: 0;
  6. padding: 0;
  7. color: #ffffff;
  8. background-image:url(http://g1-wallpapers.com/albums/userpics/10004/space-planets-snow.jpg);
  9. }
  10. #container {
  11. position: relative;
  12. top: 20%;
  13. margin: 0 auto;
  14. width: 50%;
  15. height: 100px;
  16. }
  17. #fade40 {
  18. width: 100%;
  19. height: 80%;
  20. background-color: #000000;
  21. opacity:.4;
  22. filter: alpha(opacity=40);
  23. z-index:2;
  24. }
  25. #fade80 {
  26. width:100%;
  27. height:20%;
  28. background-color:#000000;
  29. opacity:.8;
  30. filter: alpha(opacity=80);
  31. z-index:2;
  32. }
  33. </style>

HTML:
HTML and CSS Syntax (Toggle Plain Text)
  1. <body>
  2. <div id="container">
  3. <div id="fade80">Header</div>
  4. <div id="fade40">Lorem ipsum dolor sit amet, consectetur adipiscing elit. Vivamus ac orci lacus, et vestibulum massa. Sed rutrum elit erat. Nullam euismod imperdiet gravida. </div>
  5. </div>
  6. </body>
  7. </html>
Reputation Points: 11
Solved Threads: 0
Newbie Poster
Asiic is offline Offline
4 posts
since Sep 2010

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in HTML and CSS Forum Timeline: Image uploading
Next Thread in HTML and CSS Forum Timeline: Replacing Flash movie with QuickTime movie in a website





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC