Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

layout issue

Status
Not open for further replies.

gwrman

IS-IT--Management
Dec 20, 2005
94
CA
I have a layout issue that i can't seem to work out. Basically, i have a menu on the top right hand side, and content that i wrap around it. (if it is big enough.) The problem is that I want the article content to come BEFORE the menu content when parsing the code from top-down, and I can't seem to acheive this. Here is the css, and html....

CSS (middleblock is a div that is the whole page, and sidebar-block is the menu block, which i;ve floated right, inside of the "middleblock.)

Code:
#middleblock
{
margin: 15px auto;
width: 956px;
overflow: hidden;
text-align: left;
}

#sidebar-block
{
margin-left: 20px;
margin-bottom: 15px;
width: 245px;
float: right;
text-align: center;
}

HTML
Code:
<div id="middleblock">
**I want the article to go here, then the menu, which shoudl be aligned top right, to come next in the code...
	<div id="sidebar-block">
        menu items
        </div>
</div

any ideas?


 
Not much. If you need something floating vs something not floating, then you need to but the floated element first. I suppose you could float both blocks and make them siblings instead of parent-child. Then you could put whatever block you want to be first.
 
hmmm, but would that allow one to wrap under the other, if the content is large enough?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top