Wrox Programmer Forums
| Search | Today's Posts | Mark Forums Read
CSS Cascading Style Sheets All issues relating to Cascading Style Sheets (CSS).
Welcome to the p2p.wrox.com Forums.

You are currently viewing the CSS Cascading Style Sheets section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old December 8th, 2011, 03:13 PM
Authorized User
Points: 400, Level: 6
Points: 400, Level: 6 Points: 400, Level: 6 Points: 400, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2009
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
Default Two images side by side

Hi,

I have two headers that I wish to place next to each other. Can someone please explain how to do this? I've used float left for one and right for the other but it is not working.

Cheers
 
Old December 10th, 2011, 04:27 AM
Imar's Avatar
Wrox Author
Points: 70,322, Level: 100
Points: 70,322, Level: 100 Points: 70,322, Level: 100 Points: 70,322, Level: 100
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Can you post the code you're currently using? And do the two images you're trying to float fit in the container they are placed in?

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
 
Old December 12th, 2011, 05:43 AM
Registered User
Points: 6, Level: 1
Points: 6, Level: 1 Points: 6, Level: 1 Points: 6, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 2
Thanks: 0
Thanked 0 Times in 0 Posts
Default Re:placing image side by side

use <div></div container and style the images using CSS. Float the first image to left and leave a width space for the second element.
 
Old December 12th, 2011, 03:49 PM
Authorized User
Points: 400, Level: 6
Points: 400, Level: 6 Points: 400, Level: 6 Points: 400, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2009
Posts: 69
Thanks: 6
Thanked 0 Times in 0 Posts
Default Image side by side

Hi All,

I have solved my problem. Thank you very much for your assistance.

Regards
Khalil
 
Old February 1st, 2018, 07:47 AM
Registered User
Points: 27, Level: 1
Points: 27, Level: 1 Points: 27, Level: 1 Points: 27, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2018
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I am not sure why the float function is not working for you. If it is not working, you can use the flex-box layout function.

First, nest the headers inside a div. So you will have a parent div and two headers inside that.

now style the parent element like this.


.parent-div{ display:flex;}

This is all you need to add to get your two headers side by side.

Regards,

Pavithra
Spidergems
 
Old February 1st, 2018, 07:48 AM
Registered User
Points: 27, Level: 1
Points: 27, Level: 1 Points: 27, Level: 1 Points: 27, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jan 2018
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hi,

I am not sure why the float function is not working for you. If it is not working, you can use the flex-box layout function.

First, nest the headers inside a div. So you will have a parent div and two headers inside that.

now style the parent element like this.

Code:
.parent-div{ display:flex;}
This is all you need to add to get your two headers side by side.

Regards,

Pavithra
Spidergems




Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem Converting Client-side to Server-side Code kwilliams ASP.NET 2.0 Professional 1 November 21st, 2007 05:25 PM
Firing server side events at client side codes mehdi62b ASP.NET 1.0 and 1.1 Basics 6 May 18th, 2005 09:11 AM
sharing a server-side variable with client-side pigtail Javascript How-To 6 November 4th, 2004 02:01 AM
Two Client Side vs Server Side issues Milo Classic ASP Professional 5 May 25th, 2004 02:47 PM
Accessing Server Side Data on Client Side steve456 Classic ASP Professional 3 October 15th, 2003 02:33 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.