HighDots Forums  

unaccounted for spaces

Cascading Style Sheets Layout/presentation on the WWW (comp.infosystems.www.authoring.stylesheets)


Discuss unaccounted for spaces in the Cascading Style Sheets forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
TerraFrost
 
Posts: n/a

Default unaccounted for spaces - 01-10-2005 , 11:53 PM






i have a bunch of div tags next to one another, and seperated by break
tags, and am seeing space between each div tag that's seperated by a
break tag when i'd like to see none. here's the page demo'ing the
problem:

http://www.frostjedi.com/terra/dev/test.html

i've set margin and padding to 0px for everything i can think of - the
div tag, the img tag, and even the br tag. nothing seems to be
helping.
any help that could be provided here would be appreciated - thanks!


Reply With Quote
  #2  
Old   
thulsey@gmail.com
 
Posts: n/a

Default Re: unaccounted for spaces - 01-11-2005 , 12:33 AM






If I understand you correctly, you're trying to collapse the br down to
0 padding,etc.

You may not even need <br> tags, as <div> 's are block-level elements.
It should by default start on a new line as you create a new one. See
if that gets rid of your spacial anomalies.


Reply With Quote
  #3  
Old   
Alan J. Flavell
 
Posts: n/a

Default Re: unaccounted for spaces - 01-11-2005 , 03:41 AM



On Tue, 10 Jan 2005, TerraFrost wrote:

Quote:
i have a bunch of div tags next to one another, and seperated by break
tags,
Sounds like tag soup.

The validator seems to be unimpressed.

I'd suggest 1. saying what it was that you were trying to achieve
overall, rather than just presenting some unfinished markup that
failed to achieve it (it's unclear to me just what you're doing with
these extra <br> tags); 2. until you've worked out how to get the
desired result, write some plain HTML that we can see, rather than
some javascript which has to be executed in order to get it. And 3.
make sure that your examples pass the W3C validator and the CSS
"validator" before offering them for discussion here.

When you've got the desired results with static HTML, then it will be
time enough to consider dynamically generating via javascript: but I
wouldn't recommend making any web page critically dependent on js,
considering that discerning web users will have disabled the execution
of js from untrusted web pages.

good luck


Reply With Quote
  #4  
Old   
Ali Babba
 
Posts: n/a

Default Re: unaccounted for spaces - 01-11-2005 , 03:43 AM



TerraFrost wrote:

Quote:
i have a bunch of div tags next to one another, and seperated by break
tags, and am seeing space between each div tag that's seperated by a
break tag when i'd like to see none. here's the page demo'ing the
problem:

http://www.frostjedi.com/terra/dev/test.html

i've set margin and padding to 0px for everything i can think of - the
div tag, the img tag, and even the br tag. nothing seems to be
helping.
any help that could be provided here would be appreciated - thanks!

i see only 1 div tag and no br tags ?!

btw .. funny you show a html4.1 validation while in your doc-type you
claim to write XHTML 1.1



Reply With Quote
  #5  
Old   
Ali Babba
 
Posts: n/a

Default Re: unaccounted for spaces - 01-11-2005 , 03:49 AM



Ali Babba wrote:

Quote:
TerraFrost wrote:

i have a bunch of div tags next to one another, and seperated by break
tags, and am seeing space between each div tag that's seperated by a
break tag when i'd like to see none. here's the page demo'ing the
problem:

http://www.frostjedi.com/terra/dev/test.html

i've set margin and padding to 0px for everything i can think of - the
div tag, the img tag, and even the br tag. nothing seems to be
helping.
any help that could be provided here would be appreciated - thanks!


i see only 1 div tag and no br tags ?!

btw .. funny you show a html4.1 validation while in your doc-type you
claim to write XHTML 1.1

a bit to quick with the reply, just checked the script, and now i am
completely confused what you actually (dont)want.


Reply With Quote
  #6  
Old   
TerraFrost
 
Posts: n/a

Default Re: unaccounted for spaces - 01-11-2005 , 04:39 AM




Ali Babba wrote:
Quote:
TerraFrost wrote:

i have a bunch of div tags next to one another, and seperated by
break
tags, and am seeing space between each div tag that's seperated by
a
break tag when i'd like to see none. here's the page demo'ing the
problem:

http://www.frostjedi.com/terra/dev/test.html

i've set margin and padding to 0px for everything i can think of -
the
div tag, the img tag, and even the br tag. nothing seems to be
helping.
any help that could be provided here would be appreciated - thanks!



i see only 1 div tag and no br tags ?!
they were in the javascript. anyway, i've updated the page. the
javascript just seemed to be confussing people.

i want to know why there's a space between the two black boxes and i
want to know why, in firefox, the black boxes don't have a height of
two as they do in IE.

ultimately, i'd like there to be no space between the black boxes and
their height to be 2px, each.

i've set padding and margin to 0px for everything i can think of to
elimate the space, but to no avail...

Quote:
btw .. funny you show a html4.1 validation while in your doc-type you

claim to write XHTML 1.1
the image has been updated. however, for the record, the page, prior
to my changing it, did successfully validate as XHTML 1.1.



Reply With Quote
  #7  
Old   
Steve Pugh
 
Posts: n/a

Default Re: unaccounted for spaces - 01-11-2005 , 05:04 AM



"TerraFrost" <terrafrost (AT) gmail (DOT) com> wrote:
Quote:
http://www.frostjedi.com/terra/dev/test.html

i want to know why there's a space between the two black boxes
Because you have a <br> in between the two divs.

Quote:
and i
want to know why, in firefox, the black boxes don't have a height of
two as they do in IE.
Because block level boxes that contain inline content (such as text or
images) have a minimum height equal to their line-hight value.

As you haven't specified a line-height for the divs they use the
default browser value which is probably somewhere around 1.2 (In my
copy of Opera with a default font-size of 14px they're 17px tall which
is consistent with a 1.2 line-height).

Quote:
ultimately, i'd like there to be no space between the black boxes and
their height to be 2px, each.
Why not make one 4px high box then?

Steve



Reply With Quote
  #8  
Old   
Alan J. Flavell
 
Posts: n/a

Default Re: unaccounted for spaces - 01-11-2005 , 05:05 AM



On Tue, 11 Jan 2005, TerraFrost wrote:

Quote:
they were in the javascript.
See below...

Quote:
anyway, i've updated the page. the
javascript just seemed to be confussing people.
"people" weren't the only entities which were confused by it!

The key to solving complex problems is to break them down into their
self-contained parts and solve each of those, before assembling the
result into a working whole. I can only recommend that you acquire
that habit - it will make trouble-shooting a lot easier.

Quote:
the image has been updated. however, for the record, the page, prior
to my changing it, did successfully validate as XHTML 1.1.
According to XHTML rules, your javascript was commented-out, so the
substantive part of your page was non-existent! So you were relying
on browser bugs to get anything at all!! What I saw of your page on
my browser didn't even remotely resemble your verbal description in a
subsequent posting. I still suspect tag-soup: the fact that it's
xhtml-flavoured doesn't make the soup any more palatable.

good luck (you'll need it, I think)


Reply With Quote
  #9  
Old   
Ali Babba
 
Posts: n/a

Default Re: unaccounted for spaces - 01-11-2005 , 06:53 AM



TerraFrost wrote:
Quote:
Ali Babba wrote:

TerraFrost wrote:


i have a bunch of div tags next to one another, and seperated by

break

tags, and am seeing space between each div tag that's seperated by

a

break tag when i'd like to see none. here's the page demo'ing the
problem:

http://www.frostjedi.com/terra/dev/test.html

i've set margin and padding to 0px for everything i can think of -

the

div tag, the img tag, and even the br tag. nothing seems to be
helping.
any help that could be provided here would be appreciated - thanks!



i see only 1 div tag and no br tags ?!


they were in the javascript. anyway, i've updated the page. the
javascript just seemed to be confussing people.

i want to know why there's a space between the two black boxes
as somebody else already said: remove the br tag
a div tag behaves as a block and thus already includes a line break

and i
Quote:
want to know why, in firefox, the black boxes don't have a height of
two as they do in IE.

ultimately, i'd like there to be no space between the black boxes and
their height to be 2px, each.

you write:
height; 2px

i guess you ment:
height: 2px;


Reply With Quote
  #10  
Old   
Steve Pugh
 
Posts: n/a

Default Re: unaccounted for spaces - 01-11-2005 , 07:00 AM



Jan Roland Eriksson <jrexon (AT) newsguy (DOT) com> wrote:
Quote:
On 11 Jan 2005 02:39:02 -0800, "TerraFrost" <terrafrost (AT) gmail (DOT) com
wrote:

the image has been updated. however, for the record, the page, prior
to my changing it, did successfully validate as XHTML 1.1.

It was not valid none the less; you did have one single '<p />' tag in
the source as I got it here (source obtained through FF)

I don't understand why the W3 validator did not catch that one.
Because <p /> is valid XHTML.

It's not recommended for the www and is contrary to Appendix C (which
doesn't apply here as the OP claims to be using XHTML 1.1 rather than
1.0) but it is valid.

Steve



Reply With Quote
Reply




Thread Tools
Display Modes

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



Powered by vBulletin Version 3.5.4
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.