niche Posted March 18, 2011 Share Posted March 18, 2011 Using this script: http://www.lincolnsrealdeals.com/directa.php, is it possible to display text in the 10px margin? if so, how? Link to comment Share on other sites More sharing options...
dzhax Posted March 18, 2011 Share Posted March 18, 2011 what exactly do you mean by the 10px margin? the spacing between the 4 squares? If so try adding a div with height 10px and then writing in it.like so: <html><head><style type="text/css">div.ex{width:730px;height:1005px;margin:0px 0px 0px 16px;margin-left:16px;padding:0px;border:5px solid gray;}div.twoup_left{float:left;width:344px;height:149px;margin:0px 0px 0px 10px;border:3px solid gray;}div.twoup_right{float:right;width:344px;height:149px;margin: 0px 10px 0px 0px;border:3px solid gray;}div .margin_text{ height:10px !important; font-size: 9px; vertical-align: middle; text-align:center;}</style></head><body><div class="ex"> <div class="margin_text"> </div> <div class="twoup_left" > </div> <div class="twoup_right" > </div> <div class="margin_text">Text Here....</div> <div class="twoup_left" > </div> <div class="twoup_right" > </div></div></body></html> Link to comment Share on other sites More sharing options...
ShadowMage Posted March 18, 2011 Share Posted March 18, 2011 The only way to "write in a margin" is to use positioning. I would probably add position: relative to the twoup_left divs and put the text in an absolutely positioned div child.EDIT:Actually, I take that back. You can add a div like dzhax suggested, but give it a width of 10px, and a negative right margin of 10px. That should negate any space it would occupy, effectively positioning it "inside" the margins of adjacent elements. Link to comment Share on other sites More sharing options...
niche Posted March 18, 2011 Author Share Posted March 18, 2011 So, is it accurate to say that you can't embed text directly into a margin but you can float/position boxes that mimic margins and place text in them? Link to comment Share on other sites More sharing options...
ShadowMage Posted March 18, 2011 Share Posted March 18, 2011 So, is it accurate to say that you can't embed text directly into a margin but you can float/position boxes that mimic margins and place text in them?That would be a good way to put it. Link to comment Share on other sites More sharing options...
niche Posted March 18, 2011 Author Share Posted March 18, 2011 Thanks for your help dzhax and ShadowMage. Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.