Skip to content
View in the app

A better way to browse. Learn more.

Web Designer Forum

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

divs...?

Featured Replies

Hiya,

Why won't these DIV's align next to eachother???? driving me crazy!! ARGHHHHH

 

<div class="wrapper">
<div class="topwrapper">
<div class="banner"><img src="Untitled-1.jpg"  /></div>
<div class="bannertwo"><img src="banner2.jpg"  /></div></div>
</div>

 

.wrapper {
height: 700px;
width: 800px;
}
.topwrapper {

height: 121px;
width: 800px;
}
.banner {
float: left;
height: 121px;
width: 300px;


}
.bannertwo {
float: left;
height: 121px;
width: 308px;


}

are your jpgs the same width you have set your div to? because if they are not the will overlap and cause them to not sit next to each other but in some browsers appear overlapping and in others one under another.

yeah sorry the banner div's

I just tried your code and it wotked with two images I used, check the width of your images

 

or alter your html to

 

<div class="banner"><img src="Untitled-1.jpg" width="300px" />

 

Or alter your css and incorporate a background image

 

Pat

  • Author
I just tried your code and it wotked with two images I used, check the width of your images

 

or alter your html to

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
   <meta name="description" content="" />
   <meta name="keywords" content=" />

   <meta name="copyright" content="Copyright © 2008 " />
   <meta name="author" content="Michelle Hilbery" />
   <meta name="design" content=" />
   <meta http-equiv="Content-Type" content="text/html;charset=utf-8" />

   <link rel="stylesheet" type="text/css" href="css/style.css" media="screen"/>

</head>
<body><body onload="MM_preloadImages('images/aboutusover.png','file|images/galleryover.png','file|images/contact-usover.png','images/Homeover.png')">
   <div id="wrapper">

<div class="banner"><img src="untitled-1.jpg" width="300px" height="121" /></div>
<div class="bannertwo"><img src="banner2.jpg" width="308px" height="121" /></div>




</div>
</body>
</html>

 

.wrapper {
height: 700px;
width: 800px;
}
.topwrapper {

height: 121px;
width: 800px;
}
.banner {
float: left;
height: 121px;
width: 300px;



}
.bannertwo {
float: left;
height: 121px;
width: 308px;
display:inline;



}

 

I'm stubbed!!???!!!???!!!???!!!??? Can't be that hard surley... what am i missing???

 

Even tried using a background image but still won't budge...

Try altering your .banner classes width to auto in your css

 

Pat

  • Author

FOUND IT!!!!!!!!!!!!

 

 

<link rel="stylesheet" type="text/css" href="css/style.css" media="screen"/> didn't have the style sheet in the correct folder.... Thanks v much for you help guys

I knew there wasn't anything wrong with the code itself as it all worked fine for me when I copied and tested it.

 

I am happy you were able to solve it :D

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.