-
text around positioned DIV
I have a load of text in a div (div1) with another div (div2) in there containing more text which is positioned to the right using float and all the other text wraps fine around it.
Roughly :
xxxxxdiv1xxxxxx
xxxxxxxxxxxxxxx
xxxxxxxxxxdiv2
xxxxxxxxxxdiv2
xxxxxxxxxxdiv2
xxxxxxxxxxxxxx
xxxxxxxxxxxxxx
problem is I need the code for div2 to be at the end of the page of code for ASP purposes. At the moment it is written in the middle of the main text where I want Div2 to appear...
<div id="div1">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In facilisis. Suspendisse eleifend. Integer faucibus. Morbi hendrerit aliquet ligula. In non ipsum. Nunc sapien ipsum,
<div id="div2">Text for div2</div>
scelerisque rutrum, sollicitudin a, molestie id, mi. Vestibulum pellentesque sapien eget lectus. Cras egestas, nunc non eleifend consequat, eros felis molestie urna, nec ultrices dui sem vel pede. Curabitur ullamcorper.
</div>
what I want is for the code to be like
<div id="div1">
Lorem ipsum dolor sit amet, consectetuer adipiscing elit. In facilisis. Suspendisse eleifend. Integer faucibus. Morbi hendrerit aliquet ligula. In non ipsum. Nunc sapien ipsum, scelerisque rutrum, sollicitudin a, molestie id, mi. Vestibulum pellentesque sapien eget lectus. Cras egestas, nunc non eleifend consequat, eros felis molestie urna, nec ultrices dui sem vel pede. Curabitur ullamcorper.
</div>
<div id="div2">Text for div2</div>
but still have the same result as above.
The css i have for Div2 is
#div2{
width: 175px;
padding: 10px;
background-color: #EFEFEF;
color: #555;
float: right;
margin: 0 0 0 10px;
}
can anyone help
-
-
I am not quite sure what you mean, but if you want DIV2 at the end of the page
remove the css declaration float:right or is this not what you want?
-
-
nope...in the above example to get DIV2 to appear in the middle of the text in DIV1 aligned right I have to place the code for DIV2 in the middle of the code for DIV1.
What I want is to be able to put the code for DIV2 outside of the DIV1 code but it still position itself within DIV1 aligned right.
Hope this is a bit clearer
-
-
I don't think this is possible?? The code must appear in DIV 2 to be centered in DIV2....
-
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
Bookmarks