ozkanb Posted January 19, 2011 Share Posted January 19, 2011 Hi,I want to make a table like layout but without the table, table-row and table-cell properties.i do it like :for the left div:float:left;width:200px;and nothing for the right div.Left div and right div has only text in itbut there is a problem:When text in right div gets to new line, then it is not indented anymore, It goes under the left div.i want that the right div, how many lines it also has, to be indented always(200px)any suggestions? Link to comment Share on other sites More sharing options...
ozkanb Posted January 19, 2011 Author Share Posted January 19, 2011 Think i found it, i had to do this for right div:display block;margin-left: 250px; Link to comment Share on other sites More sharing options...
ShadowMage Posted January 19, 2011 Share Posted January 19, 2011 Think i found it, i had to do this for right div:display block;margin-left: 250px;A better way would be to give the right div this instead:overflow: auto; Link to comment Share on other sites More sharing options...
ozkanb Posted January 19, 2011 Author Share Posted January 19, 2011 A better way would be to give the right div this instead:overflow: auto;Yes, it is working too. Thx, but also with 'display:block;' Link to comment Share on other sites More sharing options...
ShadowMage Posted January 19, 2011 Share Posted January 19, 2011 Yes, it is working too. Thx, but also with 'display:block;'A div's default display style is block, so unless you're changing its display in another rule, there's no need to explicitly define it as block. Link to comment Share on other sites More sharing options...
ozkanb Posted January 19, 2011 Author Share Posted January 19, 2011 A div's default display style is block, so unless you're changing its display in another rule, there's no need to explicitly define it as block.hmm right, but i was working with span's, sorry :)for span's you have to give a display property Link to comment Share on other sites More sharing options...
thescientist Posted January 19, 2011 Share Posted January 19, 2011 hmm right, but i was working with span's, sorry :)for span's you have to give a display propertyright, if you need to display it so it takes on block properties. span's are inline, and thus behave differently by default. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.