Jump to content

putting paragraphs or photos next to each other horizontally.


darbok

Recommended Posts

I figured out how to use display: inline-block i'm sort of proud of myself for this... so my question is.... would i use containers if i had four paragraphs and i wanted two on top and two below in a grid sort of look?

Edited by darbok
Link to comment
Share on other sites

Yes just use block elements with a CSS property of float:left and they will position that way, assuming that the specific width you give them can fit in the available space. The width must be specified for the floats to work.

 

Cd&

Link to comment
Share on other sites

You can set the width of each of the paragraphs to 50%.

 

If you want space between them, set the width to something smaller and add margins.For example, 48% width 1% left margin and 1% right margin.

Link to comment
Share on other sites

If i had say a paragraph of text on top of a paragraph of text, and then all the way to the right I wanted a side bar, i get the idea of making two paragraphs or photos to sit next to each other, but not how to get something like a sidebar all the way to the end.. could someone help me with this?

Link to comment
Share on other sites

It is mainly a matter of setting appropriate widths using flexible units of measure like percentage, em, of vw. Generally yo need to be careful using fixed values like px because it makes the page rigid and you will end up with scroll bars at very low resolution and huge empty margins on very wide devices.

 

We will realy need to have some idea of the actual layout you intend to give a definitive answer and recommendations on how to acheive it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...