css - How to stretch an empty element horizontally -


I'm trying to get an effect in HTML + CSS like this

  _____________________ [Something Div]  

____ is a border below . It should not have a div border on the right side. I want to stretch this limit as much as possible so that it can capture the width of the parent together. I am trying to avoid any fixed spacing layout.

I did width: 100% :

   & Lt; Td id = "contentDiv" & gt; Some Div & lt; / Td> & Lt; / TR & gt; & Lt ;? Tbody & gt; & Lt; / Table & gt;  

Instead of the first place, the extra space goes to the other td I also tried to float the content div right:

 < Code> & lt; Div & gt; & Lt; Div id = "contentDiv" style = "float: correct" & gt; Some div & lt; / Div & gt; & Lt; Div id = "borderDiv" & gt; & Lt; / Div & gt; & Lt; / Div & gt;  

But div with the border div now fills the whole parent's place. There was no way to hinder it in the remaining space.

Maybe I am misunderstood questions and I know that HTML + CSS purists hate me for it. But you can not do the following:

  & lt; Table style = "width: 100%" & gt; & Lt; TR & gt; & Lt; Td style = "border bottom: 1px solid # 000, width: 100%" & gt; & Amp; Nbsp; & Lt; / Td> & Lt; Td> & Lt; Nobr & gt; My content & lt; / Nobr & gt; & Lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt;  

If there is a specific width in the second column, which you want, you can specify it and & lt; Nobr & gt; can remove the tag and end something like this:

  & lt; Table style = "width: 100%" & gt; & Lt; TR & gt; & Lt; Td style = "border bottom: 1px solid # 000, width: 100%" & gt; & Amp; Nbsp; & Lt; / Td> & Lt; Td style = "width: 200px" & gt; My content & lt; / Td> & Lt; / TR & gt; & Lt; / Table & gt;  

Comments

Popular posts from this blog

oracle - The fastest way to check if some records in a database table? -

php - multilevel menu with multilevel array -

jQuery UI: Datepicker month format -