Creating columns in WordPress

Here is a way to go about creating columns in WordPress:

The starting code for Column 1 is
div style=”float:left;width:50%;”
closed off by
/div
The starting code for Column 2 is
div style=”float:right;width:50%;”
closed off by
/div

In this instance, there are more lines of text within Column 2, so here is a test to show how unbalanced columns will appear. The question being, will they be aligned at the top, in the middle, or at the bottom? Answer: They are aligned at the top.

Column 1
a
b
c
d
e
f
Text text text text text text text text text text text text text text text text text text text text text text text text text
Column 2
g
h
i
j
k
l
m
n
o
p
q
r
s
t


The text below the /div command was being placed into Column 1, until I added the command at the end of the two columns:
br style=”clear:both;” /

Used the following commands to add a gap between the two columns:
[“25px” is used here, but you can change it according to your needs]
For column 1:
div style=”padding-right:25px;”
For column 2:
div style=”padding-left:25px;”
With each one closed off by
/div

Thanks to Matt Danner and WordPress Tips.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s