box height problem in Safari

This is a discussion on "box height problem in Safari" within the Web Page Design section. This forum, and the thread "box height problem in Safari are both part of the Design Your Website category.



 Subscribe in a reader

Go Back   Webforumz.com > Main Forums > Design Your Website > Web Page Design

Notices


Reply
 
LinkBack Thread Tools
  #1  
Old May 10th, 2007, 14:52
Junior Member
Join Date: Feb 2006
Location: West Yorks, UK
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
box height problem in Safari

I have a table which has three rows of one cell each. I have specified the height of each cell by a class referring to an external stylesheet. There are two other classes which may be relevant, one in an internal stylesheet, and one referring to the same external stylesheet.

In Firefox and Internet Explorer 5.2 (the latest available for the Mac, as far as I know), these cells are displayed correctly, but in Safari, they cut off at the bottom of the text in the box, and are therefore not the correct height. Can anyone help me correct this, please?

This is the code:

<STYLE TYPE="text/css" MEDIA=screen>
<!-- .rbc { color: white; background-color: maroon; } -->
</STYLE>
<tr class="rb2">
<td class="rbc">
<div class="squash">some text<br/></div>
<div class="squash">some more text<br/></div>
<div class="squash">yet more text<br/></div>
<div class="squash">guess what? some more text!</div>
</td>
</tr>

(I haven't wrapped it with
HTML: Select all
 and
because if I do that, it all goes onto one line, making it really difficult to follow.)

This is the CSS:

Code: Select all
.rb2 { 
height: 133px; 
vertical-align: top; 
}

.squash { 
line-height: 85%; 
}
There are other differences, all with Internet Explorer not behaving properly, but I'll do one question at a time, or it'll get confusing!

Thanks in advance.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote

  #2  
Old Oct 27th, 2007, 04:12
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: box height problem in Safari

The code should look like this:
HTML: Select all
<head>
<STYLE TYPE="text/css" MEDIA=screen>
     <!-- .rbc { color: white; background-color: maroon; } -->
</STYLE>
<head>

<body>
<table>
<tr class="rb2">
     <td class="rbc">
          <div class="squash">some text<br/></div>
          <div class="squash">some more text<br/></div>
          <div class="squash">yet more text<br/></div>
          <div class="squash">guess what? some more text!</div>
     </td>
</tr>
<table>
</body>
The styles need to be in the head, and there needs to be a table tag. Also, it is not a good idea to put divs into a table element. Can't you do it another way?
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #3  
Old Oct 27th, 2007, 10:36
Junior Member
Join Date: Feb 2006
Location: West Yorks, UK
Posts: 19
Thanks: 0
Thanked 0 Times in 0 Posts
Re: box height problem in Safari

Thanks very much for replying to my question, but to be honest it was so long ago I've forgotten what I was trying to do! And yes, I do know that styles belong in the head (I usually use a separate file for them), but I was just trying to simplify my post. Apologies if it was oversimplified.

And thanks again anyway!
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
  #4  
Old Oct 27th, 2007, 14:52
Highly Reputable Member
Join Date: Sep 2007
Age: 15
Posts: 717
Blog Entries: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Re: box height problem in Safari

Alright. I was justed looking through the unanswered posts :: there are ones from March and April in there!
Last Blog Entry: Windows Vista vs. Mac Leopard (Nov 4th, 2007)
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit! Wong this Post!
Reply With Quote
Reply

Tags
box height safari

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Real problem centreing images in Firefox/Safari... JamesHatter Web Page Design 2 Apr 10th, 2008 15:14
SAFARI / IFRAME / DIV IMAGE problem shan Web Page Design 1 Apr 10th, 2008 09:41
Navigation problem with Safari cpando1974 Web Page Design 4 Oct 8th, 2007 15:45
Text box disable problem in Safari Thanuja JavaScript Forum 1 Jun 15th, 2007 14:21


All times are GMT. The time now is 05:11.


Powered by vBulletin®
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0 RC8
© 2003-2008 Webforumz.com : All Rights Reserved

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42