473,379 Members | 1,533 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,379 software developers and data experts.

removing extra spaces

I have a csss/html question that perhaps the experts here can help me
with.
The following code leaves small gaps between the div tags. how can I
remove them?

<div >
<div >
<div
<div >
<img src="img/bultlineang2.gif">
<img src="img/minusnl.gif">
<span>test1</span>
</div>
<div >
<div >
<div >
<img src="img/bultline.gif">
<img src="img/plusnl.gif">
<span>test2</span>
</div>
</div>
</div>
</div>
</div>
</div>

Mar 16 '06 #1
4 7206
Els
dave wrote:
I have a csss/html question that perhaps the experts here can help me
with.
The following code leaves small gaps between the div tags. how can I
remove them?

<div >
<div >
<div
<div >


[snip]

First of all, close the gap between the "<div" and ">", then complete
the third one, and if you then still have gaps, show a url so we can
see what you mean.

Seeing that you are using Google Groups, I'd like you to read this
page before replying:

http://www.safalra.com/special/googlegroupsreply/

Then, if you are planning on visiting more often, I'd advise you to
read this link, as it may give you good ideas on how to have more
people reply to you:

http://blinkynet.net/comp/uip5.html

HTH :-)

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
Mar 16 '06 #2

First of all, close the gap between the "<div" and ">", then complete
the third one, and if you then still have gaps, show a url so we can
see what you mean.[
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/

[snip]

Thanks Els,

I removed all extraneous div tags and spaces but the problem is still
there.
The html just has a body tag, and 3 image tags with a div.
Normally, this problem is caused by an extra space somewhere, but I
can't see what is wrong...
http://70.71.164.85/bookmarks/test.html

Mar 16 '06 #3
Els
dave wrote:
First of all, close the gap between the "<div" and ">", then complete
the third one, and if you then still have gaps, show a url so we can
see what you mean.
I removed all extraneous div tags and spaces but the problem is still
there.
The html just has a body tag, and 3 image tags with a div.


So it's lacking a doctype ;-)
Normally, this problem is caused by an extra space somewhere, but I
can't see what is wrong...

http://70.71.164.85/bookmarks/test.html


The divs don't have any space between them.
(give the divs a border-left:1px solid red; and you will see that)

What you see is the space defined by the line-height of the text in
the <span>s.

Set the lineheight to something smaller than the images.
With your current font-size, a line-height of 0.7em seems to do the
trick, but keep in mind that if the visitor enlarges the text, the
images will part again.

--
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/
Mar 17 '06 #4
dave schreef:
First of all, close the gap between the "<div" and ">", then complete
the third one, and if you then still have gaps, show a url so we can
see what you mean.[
Els http://locusmeus.com/
accessible web design: http://locusoptimus.com/

[snip]

Thanks Els,

I removed all extraneous div tags and spaces but the problem is still
there.
The html just has a body tag, and 3 image tags with a div.
Normally, this problem is caused by an extra space somewhere, but I
can't see what is wrong...
http://70.71.164.85/bookmarks/test.html


Ah, an example, that works better: your font-size / line-height is to big.
This works:

span{
font-family: arial;
font-size: 0.8em;
line-height: 0.8em;
}

Remember to give that span a class-name!
--
Niek
Mar 17 '06 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Marco Gallo | last post by:
I've been trying to get rid of extra spaces in a table that I created with addresses in it. For instance in a field called TEST, I got the following address: " 1 main st Apt A "...
11
by: gopal srinivasan | last post by:
Hi, I have a text like this - "This is a message containing tabs and white spaces" Now this text contains tabs and white spaces. I want remove the tabs and white...
12
by: Magix | last post by:
Hi, Everytime I received a fix-length of string, let say 15 (the unused portion will filled with Spaces before receive), I want to remove the Spaces from END until I encounter a non-space char....
3
by: Ray Stevens | last post by:
Does anyone know of a Regex expression from removing extra whitespace within a string (such as 5 spaces instead of 1, etc.)?
5
by: dw | last post by:
hello - first, let me state that i am an Asp.Net rookie. here is the situation: i have a page that looks good in the vs.net designer, but when the page renders there are extra amounts...
8
by: starsky51 | last post by:
I'm sure it's something i'm doing wrong, I just can't see it. I've set up a simple page with the following code: <html> <head> <title>tester</title> <script language="javascript"...
2
by: beatTheDevil | last post by:
Hey guys, As the title says I'm trying to make a regular expression (regex/regexp) for use in removing the comments from code. In this case, this particular regex is meant to match /* ... */...
11
by: ramu | last post by:
Hi, Suppose I have a string like this: "I have a string \"and a inner string\\\" I want to remove space in this string but not in the inner string" In the above string I have to remove...
2
code green
by: code green | last post by:
I am trying to write a simple function that will take a string containing an address line or business name and return it nicely formatted. By this I mean extra spaces removed and words capitalised....
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.