943,640 Members | Top Members by Rank

Ad:
Oct 5th, 2008
0

CSS DIV container align multibrowser+unwanted margin

Expand Post »
Hi,
[/CODE]
I'm trying to make a website using divs and CSS and I'm having some problemss that I just can't solve

1.I'm using a container DIV, to center the content, and in SAFARI everything falls apart.
2.in IE7 the second orange bar is too far from the bottom of the grey ones and in FIREFOX is less seen but, as i care for grids, I would like to make a 5px margin as everywhere else.

A JPG of the renders can be seen here: http://www.andresousa.eu/browser_screen.jpg

CSS USED

HTML and CSS Syntax (Toggle Plain Text)
  1. div#container{
  2. margin-left: auto;
  3. margin-right: auto;
  4. position: relative;
  5. width: 600px;
  6. display:block;
  7. }
  8.  
  9. div#orange_bar {
  10. position: relative;
  11. width:600px;
  12. background-color: #D75600;
  13. height: 16px;
  14. margin-bottom: 0px;
  15. }
  16.  
  17. div#content_left {
  18. display:table;
  19. position: relative;
  20. background-color:#353535;
  21. width: 110px;
  22. height: 110px;
  23. margin-top: 5px;
  24.  
  25. }
  26.  
  27. div#content_right {
  28. display:table;
  29. float:right;
  30. position: relative;
  31. background-color:#353535;
  32. width: 485px;
  33. height: 110px;
  34. bottom: 110px;
  35. margin-left: 0px;
  36.  
  37. }
HTML
HTML and CSS Syntax (Toggle Plain Text)
  1. <div id="container">
  2.  
  3. <div id="orange_bar"> <p>PHOTOGRAPHY</p></div>
  4. <div id="content_left"></div>
  5. <div id="content_right"></div>
  6. <div id="content_left"></div>
  7. <div id="content_right"></div>
  8.  
  9. <div id="orange_bar"> <p>PHOTOGRAPHY</p></div>
  10. <div id="content_left"></div>
  11. <div id="content_right"></div>
  12.  
  13. <div id="orange_bar"> <p>PHOTOGRAPHY</p></div>
  14. <div id="orange_bar"> <p>PHOTOGRAPHY</p></div>
  15.  
  16. </div>
Thanks a lot, I hope you can help me fixing this as I don't really wanna use tables.
Best regards.
Last edited by Apaxe; Oct 5th, 2008 at 9:20 pm.
Reputation Points: 10
Solved Threads: 0
Newbie Poster
Apaxe is offline Offline
1 posts
since Oct 2008

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: CSS/ Div Positioning problem
Next Thread in HTML and CSS Forum Timeline: Next/Previous Navigation





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


Follow us on Twitter


© 2011 DaniWeb® LLC