Foren

<div> right of wrapper

Victor Pettersson, geändert vor 12 Jahren.

<div> right of wrapper

New Member Beiträge: 5 Beitrittsdatum: 20.03.12 Neueste Beiträge
Hi,

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


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


This place the <div> with wrapper measurements.

I want to create a div which is right of wrapper like this
http://www.greviegik.se/
A "standalone" wrapper.
thumbnail
David H Nebinger, geändert vor 12 Jahren.

RE: <div> right of wrapper

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: <div> right of wrapper

New Member Beiträge: 5 Beitrittsdatum: 20.03.12 Neueste Beiträge
Thanks for your answer,

I meant the ads to be outside the 70/30.
thumbnail
David H Nebinger, geändert vor 12 Jahren.

RE: <div> right of wrapper

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
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:

<div id="sponsor">
</div>
<div id="wrapper">
</div>


Then your CSS should make it float on the right of the wrapper.
Victor Pettersson, geändert vor 12 Jahren.

RE: <div> right of wrapper

New Member Beiträge: 5 Beitrittsdatum: 20.03.12 Neueste Beiträge
I tried that, but the site behaves like this..
Notice the gap between the menu and content.
thumbnail
David H Nebinger, geändert vor 12 Jahren.

RE: <div> right of wrapper

Liferay Legend Beiträge: 14919 Beitrittsdatum: 02.09.06 Neueste Beiträge
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, geändert vor 12 Jahren.

RE: <div> right of wrapper

New Member Beiträge: 5 Beitrittsdatum: 20.03.12 Neueste Beiträge
Okay, thanks!