The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Floating two columns of text to the right of an image?
Barca123
post Feb 21 2015, 12:01 PM
Post #1





Group: Members
Posts: 2
Joined: 21-February 15
Member No.: 22,229



I am a bit stuck on this one.

I am looking to float two vertical columns of text next to an image. I know how to float text to the right or left of an image, but unforunately I do not know how to float two columns?

Any ideas?
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Feb 21 2015, 02:05 PM
Post #2


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



Float both the image and the first (or both) of the columns.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Barca123
post Feb 21 2015, 04:35 PM
Post #3





Group: Members
Posts: 2
Joined: 21-February 15
Member No.: 22,229



THe image on the left and two columns of text to the right.

E.G - Image Column1 Column2


THanks
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Feb 21 2015, 04:57 PM
Post #4


.
********

Group: WDG Moderators
Posts: 9,656
Joined: 10-August 06
Member No.: 7



Yes, try this:

CODE
<style type="text/css" media="screen">
img, p {
width: 100px;
float: left;
}
</style>

<img src="dog.jpg" width="100" height="50" alt="">
<p>Column1</p>
<p>Column2</p>
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
MikeK
post Mar 1 2015, 08:57 AM
Post #5


Newbie
*

Group: Members
Posts: 15
Joined: 16-February 15
Member No.: 22,204



With CSS3 you can create multiple columns of text in a container.

The easiest way to do what you request is to put the text columns into a container and format the text into columns using column-count in CSS. Then you can setup as many columns as you need in the container and just float left the individual container.

Just a new way of looking at things.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Frederiek
post Mar 2 2015, 08:14 AM
Post #6


Programming Fanatic
********

Group: Members
Posts: 5,146
Joined: 23-August 06
From: Europe
Member No.: 9



As far as I understand it, there's only partial support for CSS3 column layouts, even in modern browsers. See http://caniuse.com/#search=column
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
MikeK
post Mar 9 2015, 07:01 AM
Post #7


Newbie
*

Group: Members
Posts: 15
Joined: 16-February 15
Member No.: 22,204



That is correct, as with all CSS3 features that is not full support across all browsers as of yet. But if you use the rendering engine prefixes there is support as listed below.

Chrome - 4.0 -webkit-
IE as of version 10.
Firefox - 2.0 -moz-
Safari - 3.1 -webkit-
Opera - 15.0 -webkit-

They are all moving in the right direction and soon this will be a non-issue. The bigger issue is getting the users onto the newer browsers.

Mike
Web Development Training
OnTargetHTML5.com
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
1 User(s) are reading this topic (1 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 23rd April 2024 - 07:10 AM