943,608 Members | Top Members by Rank

Ad:
Aug 6th, 2009
0

CSS DIV question

Expand Post »
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. }
Similar Threads
Reputation Points: 11
Solved Threads: 3
Junior Poster
Reliable is offline Offline
152 posts
since Jul 2007
Aug 6th, 2009
0

Re: CSS DIV question

please also post the HTML code as in above code you have lot of divs
Reputation Points: 165
Solved Threads: 59
Posting Pro in Training
DangerDev is offline Offline
485 posts
since Jan 2008
Aug 8th, 2009
0

Re: CSS DIV question

I actually solved my problem. I forgot that floating divs need to have a set width for another div to be by its side.
Reputation Points: 11
Solved Threads: 3
Junior Poster
Reliable is offline Offline
152 posts
since Jul 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

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: repeating menu?
Next Thread in HTML and CSS Forum Timeline: Frameset syntax...





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


Follow us on Twitter


© 2011 DaniWeb® LLC