Reply
Box size problem in Opera
Old 04-07-2008, 04:48 AM Box size problem in Opera
Novice Talker

Posts: 10
Hello,

I have a code below which works fine in IE and Firefox. However in Opera the 4 boxes are displayed in a 2x2 form insetad of 4x1.

Any idea?

Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>
<style type="text/css">
#container {
    margin: auto;
   padding:0px;
    width: 980px;
    border: 1px solid #000000;
}

#center {
    margin: 0px;
    padding: 0px;
   clear:both;
}

#left_panel {
    width: 240px;
    float:left;
   border:1px solid #ff0000;
}

#main_panel {
    padding: 0px;
    margin:  0px;
    margin-left:295px;
    width:660px;
    border:0px solid #ff0000;
}


#main_panel #main_panel_header {
    padding-top: 5px;
    border:1px solid #ff0000;
    overflow:hidden;
}

#main_panel_header .photo_box {
   float:left;
   background-color:#000000;
}

#main_panel_header .photo_box img {
    background-color: #000000;
    height: 115px;
    width: 140px;
   border:2px solid #000;
   border-bottom:0px;
   margin:0px;
}

#main_panel_header .photo_box a{
    color: #ffffff;
    text-decoration:none;
   font-size:10px;
   font-weight:bold;
   display:block;
   text-align:right;
   text-transform: uppercase;
   width:140px;
   float:left;
   padding:2px;
   margin:0px;
   background-color:#000000;
}

</style>
</head>

<body>
<div id="container">
    <div id="center">
        <div id="left_panel">
            Menu1<br/>Menu1<br/>
        </div>
        <div id="main_panel">
            <div id="main_panel_header">
                <div class="photo_box">
                    <img src="style/tmp/pic.jpg" />
                    <a href="#">Link</a>
                </div>
                <div class="photo_box">
                    <img src="style/tmp/pic.jpg" />
                    <a href="#">Link</a>
                </div>
                <div class="photo_box">
                    <img src="style/tmp/pic.jpg" />
                    <a href="#">Link</a>
                </div>
                <div class="photo_box">
                    <img src="style/tmp/pic.jpg" />
                    <a href="#">Link</a>
                </div>
            </div>
        </div>
    </div>
</div>
</body>
</html>
elmu is offline
Reply With Quote
View Public Profile
 
When You Register, These Ads Go Away!
     
Old 04-07-2008, 07:23 AM Re: Box size problem in Opera
chrishirst's Avatar
Super Moderator

Posts: 11,713
Location: Blackpool. UK
A URL for the problem page would be useful.
__________________
Chris. ->> Links are advertising NOT optimising!! <<-
Indifference will be the downfall of mankind, but who cares?
Code Samples | People Counting System
chrishirst is offline
Reply With Quote
View Public Profile Visit chrishirst's homepage!
 
Old 04-07-2008, 07:25 AM Re: Box size problem in Opera
Novice Talker

Posts: 5
Name: appy
please give your site url so that we can analyse it
unitechy is offline
Reply With Quote
View Public Profile
 
Old 04-07-2008, 09:28 AM Re: Box size problem in Opera
Novice Talker

Posts: 10
In the meantime I could solve the problem with some help

The solution is to remove float:left in case of a tag.
elmu is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Box size problem in Opera
 

Thread Tools

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

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




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.11693 seconds with 13 queries