Webcompose

Information

This article was written on 07 Apr 2012, and is filled under Web Design, WordPress.

Using
tags in WordPress and other places

The wordpress environment is not perfect when you need to do some specific layout within a document. The div tag is a flexible html tag when combined with CSS.

This is one way to add more control within a post or a page. For example how about a picture in a post and some text to the right.

First CSS is the feature that gives visual and design control to HTML.

The way to add CSS to a div tag is to use the style command.

This is the text
Note that the “float:left” is in both sets of tags The first item will move to the left and the second item will follow.

Here’s the code:
<div style="float:left;"><img src="/wp-content/uploads/2012/04/Train-RGB-799882.jpg"></div><div style="float:left;">This is the text</div>

This is the text and more text
Here’s the code:
<div style="float:left;margin:20px 10px;"><img src="/wp-content/uploads/2012/04/Train-RGB-799882.jpg"></div><div style="float:left;margin:20px 10px;">This is the text and more text</div>

Comments are closed.

Recent articles

Recent comments