Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > CSS problem...

CSS problem...
Thread Tools
Mac Guru
Mac Elite
Join Date: Nov 1999
Status: Offline
Reply With Quote
Oct 28, 2003, 12:46 AM
 
I'm working on a price chart for my website but I'm getting HUGE line space between the different sections... and I can't figure out how to bring the lines closer. Basically I want them stacked on top of each other, not spaced out.

http://www.jamesmeister.com/cost.html

Lemme know if you see something I don't

Thanks,
Mac Guru
     
Millennium
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Oct 28, 2003, 09:20 AM
 
Originally posted by Mac Guru:
I'm working on a price chart for my website but I'm getting HUGE line space between the different sections... and I can't figure out how to bring the lines closer. Basically I want them stacked on top of each other, not spaced out.

http://www.jamesmeister.com/cost.html

Lemme know if you see something I don't

Thanks,
Mac Guru
Just a thought; consider replacing your point-based font sizes with pizel-based, if you really want a fixed font size like that. Most browsers have bugs with points, which is likely to be at least contributing to the problem you're having, if it's not the entire cause.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
clam2000
Dedicated MacNNer
Join Date: Aug 2002
Status: Offline
Reply With Quote
Oct 28, 2003, 10:09 AM
 
my guess is that the [h4] tags are causing the problem.

make a second, imbedded table.


...
[table height=36]
[tr][td height=12 style="font-size: 13; font-weight: bold;"]
128 x 128 pixels
[/td][/tr][tr][td height=12 style="font-size: 15; font-weight: bold;"]
$175.[sup]00[/sup]
[/td][/tr][tr][td height=12 style="font-size: 17; font-weight: bold;"]
per icon
[/td][/tr]
[/table]
...

example:
<table height=36><tr><td height=12 style="font-size: 13; font-weight: bold;">128 x 128 pixels</td></tr><tr><td height=12 style="font-size: 15; font-weight: bold;">$175.<sup>00</sup></td></tr><tr><td height=12 style="font-size: 17; font-weight: bold;">per icon</td></tr></table>

--will
( Last edited by clam2000; Oct 28, 2003 at 10:21 AM. )
     
york28
Senior User
Join Date: Mar 2002
Location: Chicago, IL
Status: Offline
Reply With Quote
Oct 28, 2003, 02:00 PM
 
It's easy, just add
Code:
padding: 0; margin: 0;
to each of your heading tag style declarations (H2, H3, etc.)
That ought to kill the unwanted space. Most of the default tags have default spacing that you almost always have to get rid of for anything to work.
We need less Democrats and Republicans, and more people that think for themselves.

infinite expanse
     
m a d r a
Mac Elite
Join Date: Sep 2001
Location: the intarweb
Status: Offline
Reply With Quote
Oct 28, 2003, 05:23 PM
 
ask 4 different people - get four different answers!

it's because &lt;H&gt; is a block element, so the browser puts a carriage return after each &lt;/H&gt; end tag.

if you're determined to use &lt;H&gt; tags, rather than create custom classes, you'll have to redefine your &lt;H2&gt;,&lt;h3&gt; and &lt;H4&gt; tags as being 'inline elements instead. thus...

Code:
H2 { color: #666666; font: 12pt Arial, sans-serif; display:inline; } H3 { color: #666666; font: bold 30pt Arial, sans-serif; display:inline; } H4 { color: black; font: 10px Arial, sans-serif; display:inline; }
then. because you've now redefined your &lt;H&gt; tags to display inline, you'll have to explicitly add &lt;BR&gt; tags into your HTML to format up the numbers as you want...

Code:
&lt;table width="200" border="0" class="price_tab"&gt; &lt;tr&gt; &lt;td&gt;&lt;h4&gt;128 x 128 pixels&lt;/h4&gt; &lt;br&gt; &lt;h3&gt;$175.&lt;sup&gt;00&lt;/sup&gt;&lt;/h3&gt; &lt;br&gt; &lt;h2&gt;per icon&lt;/h2&gt; &lt;/td&gt; &lt;/tr&gt; &lt;/table&gt;
oh. BTW - millenium is right. you should use pixels instead of points for your text sizes as a point on a PC isnae necessarily the same as a point on a mac.
     
   
 
Forum Links
Forum 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
Top
Privacy Policy
All times are GMT -4. The time now is 06:37 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,