Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsGeneralPHPASPPerlColdFusionFlashHTML, CSS, ScriptsBrowsers

Webmaster Forum / HTML, CSS, Scripts / CSS / August 2003



Tip: Looking for answers? Try searching our database.

percentage width and em margins problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Andy Moss - 28 Aug 2003 10:09 GMT
I have a table wrapped in a div like this:

<div id="content"><table id="calendar">
    <tr>
        <th id="caldate"><span>Date</span></th>
        <th id="caltitle"><span>Title</span></th>
        <th id="caltime"><span>Time</span></th>
        <th id="calroom"><span>Room</span></th>
        <th id="calvenue"><span>Venue</span></th>
    </tr>
       <tr>
               <td>hgbfdds</td>
               <td>hgbfdds</td>
               <td>hgbfdds</td>
               <td>hgbfdds</td>
               <td>hgbfdds</td>
       </tr>
</table></div>

im using tables as it is tabular data, its not for layout purposes. my
div tag has these properties:

#content {
    margin-left: 12.2em;
    border: 1px solid #006699;
    margin-right: 0.2em;
    margin-top: 1em;
}

my table has these properties in the style sheet:

table {
    border: none;
    margin-left: 0.2em;
    margin-right: 0.2em;
}
#calendar {
    border: none;
    margin-left: 0.2em;
    margin-right: 0.2em;
    width: 100%;
}
#calendar tr {
    border-bottom: dashed 1px #006EAB
}
#calendar td {
    padding: 5px 3px;
}

what happens is the table is taking up 100% of the width of the
document + the 12em  margin of the div + the o.2em + 0.2em. shouldnt
the table be taking up 100% of the div width? anybody have a
solution/advice for this problem. As always any help is much
appreciated

Thanks

Andy
Gerhard Fiedler - 28 Aug 2003 17:21 GMT
what happens if you remove the width:100% from the #calendar style?

>I have a table wrapped in a div like this:
>
[quoted text clipped - 54 lines]
>
>Andy
Andy Moss - 28 Aug 2003 21:56 GMT
> what happens if you remove the width:100% from the #calendar style?
>
[quoted text clipped - 56 lines]
>>
>>Andy

if i remove the width:100% from the #calendar properties it doesn't fill
the containing div. If i use the 100% it works fine in Moz (no surprises
there ;)
Nikolaos Giannopoulos - 30 Aug 2003 22:54 GMT
> what happens is the table is taking up 100% of the width of the
> document + the 12em  margin of the div + the o.2em + 0.2em. shouldnt
> the table be taking up 100% of the div width? anybody have a
> solution/advice for this problem. As always any help is much
> appreciated

Sounds like the IE5 box model bug.

If you specify the specific browser that you see problems in then it
will go a long way to helping others help you ;-)

--Nikolaos
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.