Page Layout Question

wilhorse

New Member
Hello, I would like to layout a page with photos on one 1/2, and text on the other. The images I need to display are best handled running down the page vertically, which leaves the right side of the page blank. I've decided against a slider. Is there a widget or plugin that works per page? When I install widgets they effect the whole site. I'd ask person who built the theme, but there's no support. Just curious if there is an easy way to handle what I'm trying to do. Thanks
 

wilhorse

New Member
Thanks Ashe:)

" reword your question....." sorry? Don't understand your statement. I think Ashe understands what I'm trying to do, and that is have photos on one side, text on the other. Sorry if my question was worded wrong.
 

Roddy

New Member
The fact that you are using a theme and referring to widgets would suggest that your not comfortable with CSS?

Divide the content into two divs - "main" and "aside". Give them appropriate widths, margins, padding and so on, put the "main" div first in the HTML. Set the "main" div to "float:left;" and float the aside right.

Add "clear:both" to the footer CSS or use a clear fix div if you want any full width content below your columns.

HTML...

Code:
<div id="wrap">
<div id="header"></div>
<div id="nav"></div>
<div id="main"></div>
<div id="aside"></div>
<div id="footer"></div>
</div>

CSS...

Code:
#main {
float:left;
width:XXXpx;
}
#aside {
float:right;
width:XXXpx;
}
#footer {
clear:both;
}
 

Phreaddee

Super Moderator
Staff member
people learn floating properly before posting advice!!!

there is no need to float the 2nd div right, and if you did you would need to place it in the document FIRST. alternatively go with the document flow and float them both left. I know floating left, but you want it on the right...

its left. trust me, its left.
 

Roddy

New Member
You are right - in a way - and I am guilty of making two assumptions.

The first being that most people read from left to right and the second that the sidebar would float down below the main content on narrower screens.
 

wilhorse

New Member
Thank you!!! Roddy that is very helpful. I didn't know enough to alter the codes, but that's easy enough. Learning more every day. Thank you:)
 

Phreaddee

Super Moderator
Staff member
the only assumption you are making is that placing a right floated element in the document flow after a left floated element will always float to the right on the same horizontal plane as the left floated element, and that assumption is wrong.

the first assumption is how it would display with both elements floated left
the second assumption would possibly happen in both scenarios, however as you stipulated in your first assumption, people read left to right, therefore a left floated element will then fall below in the natural reading position (on the left) whilst floating the element right would push the element to the far right, which would not be desirable. quite possibly with dodgy maths and a "smaller-than-design" browser window, the right bar could be almost hidden.
 
Top