Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
Victor Pettersson
<div> right of wrapper
March 23, 2012 3:47 AM
Answer

Victor Pettersson

Rank: New Member

Posts: 5

Join Date: March 20, 2012

Recent Posts

Hi,

<div> code in portal_normal.vm
1<div id="sponsor">
2content
3</div>


css code in custom.css
1#sponsor {
2 float: right;
3}


This place the <div> with wrapper measurements.

I want to create a div which is right of wrapper like this
1http://www.greviegik.se/
A "standalone" wrapper.
David H Nebinger
RE: <div> right of wrapper
March 23, 2012 5:11 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11087

Join Date: September 1, 2006

Recent Posts

The only thing that makes it on the right in the referenced URL is the fact that the structure there is tables & rows, and the row w/ the ads is the right most row. There's nothing magical about their layout, you could do a 70/30 layout and get the same thing without doing a line of theme coding...
Victor Pettersson
RE: <div> right of wrapper
March 23, 2012 7:46 AM
Answer

Victor Pettersson

Rank: New Member

Posts: 5

Join Date: March 20, 2012

Recent Posts

Thanks for your answer,

I meant the ads to be outside the 70/30.
David H Nebinger
RE: <div> right of wrapper
March 23, 2012 6:59 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11087

Join Date: September 1, 2006

Recent Posts

Well that you will have to do in the theme, but you'd have to embed the portlet that is supposed to be on the right hand side.

In portal_normal.vm, you'd add your div outside of the wrapper, such as:

1<div id="sponsor">
2</div>
3<div id="wrapper">
4</div>


Then your CSS should make it float on the right of the wrapper.
Victor Pettersson
RE: <div> right of wrapper
March 23, 2012 7:29 AM
Answer

Victor Pettersson

Rank: New Member

Posts: 5

Join Date: March 20, 2012

Recent Posts

I tried that, but the site behaves like this..
Notice the gap between the menu and content.
Attachment

Attachments: tried.png (103.6k)
David H Nebinger
RE: <div> right of wrapper
March 23, 2012 7:43 AM
Answer

David H Nebinger

Community Moderator

Rank: Liferay Legend

Posts: 11087

Join Date: September 1, 2006

Recent Posts

So you're looking at CSS issues, not Liferay issues.

Your display for the div is probably set to block which will affect the underlying area.
Victor Pettersson
RE: <div> right of wrapper
March 23, 2012 7:50 AM
Answer

Victor Pettersson

Rank: New Member

Posts: 5

Join Date: March 20, 2012

Recent Posts

Okay, thanks!