Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Web Programming > CSS > CSS Cascading Style Sheets
Password Reminder
Register
Register | FAQ | Members List | Calendar | 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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developersí questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old December 8th, 2011, 02:13 PM
Authorized User
Points: 378, Level: 6
Points: 378, Level: 6 Points: 378, Level: 6 Points: 378, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2009
Posts: 67
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
Reply With Quote
  #2 (permalink)  
Old December 10th, 2011, 03:27 AM
Imar's Avatar
Wrox Author
Points: 71,662, Level: 100
Points: 71,662, Level: 100 Points: 71,662, Level: 100 Points: 71,662, Level: 100
Activity: 100%
Activity: 100% Activity: 100% Activity: 100%
 
Join Date: Jun 2003
Location: Utrecht, Netherlands.
Posts: 17,015
Thanks: 79
Thanked 1,578 Times in 1,555 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!
Reply With Quote
  #3 (permalink)  
Old December 12th, 2011, 04: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.
Reply With Quote
  #4 (permalink)  
Old December 12th, 2011, 02:49 PM
Authorized User
Points: 378, Level: 6
Points: 378, Level: 6 Points: 378, Level: 6 Points: 378, Level: 6
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2009
Posts: 67
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
Reply With Quote
  #5 (permalink)  
Old February 1st, 2018, 06: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
Reply With Quote
  #6 (permalink)  
Old February 1st, 2018, 06: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
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

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 04: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 01: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



All times are GMT -4. The time now is 08:33 PM.


Powered by vBulletin®
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.