CSS DIV question

Thread Solved

Join Date: Jul 2007
Posts: 84
Reputation: Reliable is an unknown quantity at this point 
Solved Threads: 2
Reliable Reliable is offline Offline
Junior Poster in Training

CSS DIV question

 
0
  #1
Aug 6th, 2009
My div background color did not show up when I placed it in the external CSS sheet. I went ahead and made it an inline style and got my desired result except for thebig space between the right side of the picture and the edge of the containing div. Why is that? I was trying to stay away fro tables which immediately gave me the result I have now.

HTML and CSS Syntax (Toggle Plain Text)
  1. @charset "utf-8";
  2. /* CSS Document */
  3.  
  4. body{
  5. background:#edba19;
  6. background-repeat:repeat-x;
  7. background-image:url(background.jpg);
  8. background-position: top;
  9. }
  10.  
  11. div #container{
  12. font-family:Arial, Helvetica, sans-serif;
  13. font-size:10px;
  14. background-color:#843382;
  15. text-align: justify;
  16. margin-left: 40px;
  17. color: #FFFFFF;
  18.  
  19. }
  20. div #name{
  21. padding-left:30px;
  22. }
  23. div #logo{
  24. padding-left: 20px;
  25. float: left;
  26. padding-right: 20px;
  27. }
  28. div #headpic{
  29. padding-bottom: 3px;
  30. }
  31.  
  32. a:active,a:link{
  33. color: #FFFFFF;
  34. text-decoration: underline;
  35. }
  36. a:hover {
  37. text-decoration: underline; color:#FFFFFF}
  38.  
  39. a img {border:0px; }
  40.  
  41.  
  42. #header {
  43.  
  44.  
  45. }
Reply With Quote Quick reply to this message  
Join Date: Jan 2008
Posts: 483
Reputation: DangerDev has a spectacular aura about DangerDev has a spectacular aura about 
Solved Threads: 58
DangerDev's Avatar
DangerDev DangerDev is offline Offline
Posting Pro in Training

Re: CSS DIV question

 
0
  #2
Aug 6th, 2009
please also post the HTML code as in above code you have lot of divs
Freedom in the Mind, Faith in the words.. Pride in our Souls...
Indian Developer
http://falaque.wordpress.com/
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 84
Reputation: Reliable is an unknown quantity at this point 
Solved Threads: 2
Reliable Reliable is offline Offline
Junior Poster in Training

Re: CSS DIV question

 
0
  #3
Aug 8th, 2009
I actually solved my problem. I forgot that floating divs need to have a set width for another div to be by its side.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the HTML and CSS Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC