Archdeacon Posted March 29, 2012 Share Posted March 29, 2012 I have the 2 'div' columns (side by side) in another 'wrapper' 'div' but cannot get the 'border' to wrap around the whole thing - it just forms a small box border across the page, about 1em deep!. However, if I remove the DOCTYPE line below it all works! What should I use instead please? I cant get this entered properly - the DOCTYPE line has gone; sorry."" Link to comment Share on other sites More sharing options...
dsonesuk Posted March 29, 2012 Share Posted March 29, 2012 html, css anything? sorry i was away ill when they were given out telepathitic lesson. Link to comment Share on other sites More sharing options...
thescientist Posted March 29, 2012 Share Posted March 29, 2012 keep the doctype, and fix your markup/css. how, you ask? as stated, we'll never know unless we can see what your code is. Link to comment Share on other sites More sharing options...
Archdeacon Posted March 29, 2012 Author Share Posted March 29, 2012 I have included the basics of the HTML file here, assuming that theses tages work now.body { border: 0px;margin: 0px;padding: 0px; color: black; background: blue;margin-left: 7%;margin-right: 7%;}#box { border:solid;border-width: thin;width:98%;} #leftbox {display:inline;float:left;width:47%; }#rightbox {display:inline;float:right;width:47%;}<p id="box"> Link to comment Share on other sites More sharing options...
Archdeacon Posted March 29, 2012 Author Share Posted March 29, 2012 Sorry if anything is missing again from the above, but I enclosed it all in 'PRE' tags, but all of the CSS code is there. The 'Box' is the 'div' id that includes 'leftbox' and 'rightbox'. Both IE9 and Firefox will not wrap the border correctly unless the Doctype line is removed. Link to comment Share on other sites More sharing options...
dsonesuk Posted March 29, 2012 Share Posted March 29, 2012 ??? if it is the div 'id', Why is it applied to paragraph element? Just guessing here, but the floated elements area WHATEVER they are, will not be detected by the outer container, but! by applying overflow: hidden; to the outer container #box should fix this. Link to comment Share on other sites More sharing options...
thescientist Posted March 29, 2012 Share Posted March 29, 2012 all I see is CSS and one HTML element. could you please post the entire code? (in code tags) edit: yeah, as said, it probably because you are using floats Link to comment Share on other sites More sharing options...
Archdeacon Posted March 29, 2012 Author Share Posted March 29, 2012 I cant get the code tags to work properly. That 'p' id thing was put there by this posting. Give me a while and I will see what I can do, but there is a wrapper 'div' tag containing 2 others, one id=leftbox and the other id=rightbox. Link to comment Share on other sites More sharing options...
Archdeacon Posted March 29, 2012 Author Share Posted March 29, 2012 dsonesuk, Thank you very much indeed for that! It was overflow:hidden; that was needed. I have no idea what this does but I will soon. Thanks again. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.