Forum Moderators: not2easy

Message Too Old, No Replies

trying to get two blocks to sit side by side

         

mehran

6:28 pm on May 11, 2008 (gmt 0)

10+ Year Member



hello, i am very new(in fact very very new) to css.
what my promblem is i am try to get two blocks to sit side to side.
now in fire fox it shows the two blocks side by side but stops there and does not show the block under it.

ie on the other hand only shows the left block and stops there and shows nothing else

i hope you are following me

here is the code, the promblem is around h3 & h4(i think)

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>argi</title>
<style type="text/css" media="all">

body {font-family: arial, helvetica, sans-serif;
font-size: 1em;
color: red;
background: #000000;

}
div { width: 762px;
margin: auto;

}
h1 { height: 137px;
width: 760px;
background: #ffffff;
margin: 0;
background: white url(ewr_03.gif) top left no-repeat;

}
h1 span{height: 137px;
width: 760px;
background: #ffffff;
margin: 0;
display: block;
background: url(ewr_05.gif) top right no-repeat;

}
h2 {height: 18px;
width: 760px;
background: #efad31;
margin: 0;
font-size: 14px;
color: #ffffff;
font-weight: bold;
text-align: center;
word-spacing: 6em;
}
h3 {height: 250px;
width: 360px;
background: #2d4f92;
margin: 0;
float: left;

}

h4 {height: 250px;
width: 400px;
background: #2d4f92;
margin: 0;
color: blue;
float: right;

}

h5 {height: 250px;
width: 760px;
background: #2d4f92;
margin: 0;
color: blue;

}

</style>
</head>
<body>

</body>
</html>

swa66

6:50 am on May 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



what's in the <body> that still triggers the problem (to understand nesting etc.)

I'm presuming you're trying to put a h3 and a h4 next to one another inside some of the others?

mehran

7:40 am on May 12, 2008 (gmt 0)

10+ Year Member



in the left block(h3) there is a .swf file
and in h4 just text.
it looks like this

<body>
<div>
<h1><span><img src="other/argilogo.gif" width="263" height="137" alt="argi logo" /></span></h1>
<h2>Home Forum ARGI-Installer About-Us Contant</h2>
<h3>
<object style="WIDTH: 360px; HEIGHT: 250px;" id="f1fg"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,79,0"
classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param value="f11.swf" name="movie">
<param value="#FFFFFF" name="bgcolor">
<param value="high" name="quality">
<param value="samedomain" name="allowscriptaccess">
<embed style="WIDTH: 360px; HEIGHT: 250px;" allowscriptaccess="samedomain"
swliveconnect="true" quality="high" bgcolor="#FFFFFF" src="f11.swf"
name="f11" pluginspage="http://www.macromedia.com/go/getflashplayer"
type="application/x-shockwave-flash"></embed>
</h3>
<h4>
ttusgfopesh fewodddddfigef<br />
ttusgfopesh fewodddddfigef<br />
ttusgfopesh fewodddddfigef<br />
</h4>
<h5>some text</h5>
</div>
</body>
(start it and stop it on a new lines)

mehran

10:36 am on May 12, 2008 (gmt 0)

10+ Year Member



hello, i managed to fix it by adding a float: left; to h5 i have no idea why that work but it does.

mehran

11:37 am on May 12, 2008 (gmt 0)

10+ Year Member



ok...was a little too quick, it works in ff with the .swf part in it and it works in ie with out the flash in it but as soon as the flash is add back in to the body it stops working again in ie... any ideas?

Marshall

1:18 pm on May 12, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



mehran,

Since your are floating both <h3> and <h4> you need to clear them. After the <h4> tag and before the <h5> tag, put <br style="clear: both;"/>. What I do not understand is why you are using <h> tags. It may be easier to use two <div>'s, one for the .swf and one for the text. Another option is a <div> with and embedded <div>, e.g.

<div> <!-- The width of this is whatever the parent is -->
<div style="width: 360px; float: left; margin-right: 5px;">.swf</div><h4>text text text text</h4></div>

Just a suggestion.

Marshall

mehran

5:31 pm on May 12, 2008 (gmt 0)

10+ Year Member



thank you for your reply marshall,
i have track down the problem to a missing </object> tag in the the .swf bit, the browser would display the .swf file but stop.

i only started using css two days ago so coding has been some what brute force of just hammering away at it till it works. that is way it is all in <h> tags, i simply did not know any better. i have ordered a book to help me a bit more