473,799 Members | 2,842 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Diplay: Block problem

I am redesigning a web site to use css in place of tables. I am having a
problem with the display: block; statement. With the display: block
statement in place in the navbar div I am getting spaces between the lines.
this can be seen at http://mildenhallgroup.org.uk/newsletter-new.htm With
the display statement removed the spaces go but the lines are not full. How
can I fix this? The navbar css follows:

#navbar{
position: absolute;
top: 100px;
left: 0px;
width: 170px;
padding: 3px;
border: 1px #006633 solid;
}

#navbar ul li a:link, #navbar ul li a:visited {
color: #ffffff;
background-color: #006633;
background-image: none;
border-bottom: solid #ffffff 1px;
padding-left: 10px;
text-decoration: none;
display: block;
font-size: .8em;
}

#navbar ul li a:hover {
color: #ffff00;
background-color: #006633;
background-image: none;
}
#navbar ul li {
list-style-type: none;
margin: 0;
padding: 0;

}

#navbar ul {
margin: 0;
padding: 0;
}
Thanks

Albert
Jul 21 '05 #1
4 3443
Els
Albert Browne wrote:
I am redesigning a web site to use css in place of tables. I am having a
problem with the display: block; statement. With the display: block
statement in place in the navbar div I am getting spaces between the lines.
this can be seen at http://mildenhallgroup.org.uk/newsletter-new.htm With
the display statement removed the spaces go but the lines are not full. How
can I fix this? The navbar css follows:


[snip code]

Firefox and Opera don't display spaces.

Try changing your doctype from
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

to

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">

so that IE follows (or at least tries to follow ;-) ) the same
standards as the other browsers.

--
Els http://locusmeus.com/
Sonhos vem. Sonhos vão. O resto é imperfeito.
- Renato Russo -
Now playing: Nelson - Love & Affection
Jul 21 '05 #2
in comp.infosystem s.www.authoring.stylesheets, Albert Browne wrote:
I am redesigning a web site to use css in place of tables. I am having a
problem with the display: block; statement. With the display: block
statement in place in the navbar div I am getting spaces between the lines.
this can be seen at http://mildenhallgroup.org.uk/newsletter-new.htm With
the display statement removed the spaces go but the lines are not full. How
can I fix this? The navbar css follows:


Things work nicely in opera. Your page trickkers quirks more, so it is
hard to quess what is needed for IE. Use doctype decleration mentioned in
spec. It might even be enough to fix it.
See http://hsivonen.iki.fi/doctype/

It is totally broken in Gecko/20041001, don't know why.

--
Lauri Raittila <http://www.iki.fi/lr> <http://www.iki.fi/zwak/fonts>
Utrecht, NL.
Support me, buy Opera:
https://secure.bmtmicro.com/opera/bu...tml?AID=882173
Jul 21 '05 #3
Had the same problem recently. Don't know the reason, but adding this:
height: 1%; after display: block; solved that problem in IE.
"Albert Browne" <al***********@ ntlworld.com> wrote in message
news:XB******** ***********@new sfe1-gui.ntli.net...
I am redesigning a web site to use css in place of tables. I am having a
problem with the display: block; statement. With the display: block
statement in place in the navbar div I am getting spaces between the
lines.
this can be seen at http://mildenhallgroup.org.uk/newsletter-new.htm With
the display statement removed the spaces go but the lines are not full.
How
can I fix this? The navbar css follows:

#navbar{
position: absolute;
top: 100px;
left: 0px;
width: 170px;
padding: 3px;
border: 1px #006633 solid;
}

#navbar ul li a:link, #navbar ul li a:visited {
color: #ffffff;
background-color: #006633;
background-image: none;
border-bottom: solid #ffffff 1px;
padding-left: 10px;
text-decoration: none;
display: block;
font-size: .8em;
}

#navbar ul li a:hover {
color: #ffff00;
background-color: #006633;
background-image: none;
}
#navbar ul li {
list-style-type: none;
margin: 0;
padding: 0;

}

#navbar ul {
margin: 0;
padding: 0;
}
Thanks

Albert

Jul 21 '05 #4

"Albert Browne" <al***********@ ntlworld.com> wrote in message
news:XB******** ***********@new sfe1-gui.ntli.net...
I am redesigning a web site to use css in place of tables. I am having a
problem with the display: block; statement. With the display: block
statement in place in the navbar div I am getting spaces between the lines. this can be seen at http://mildenhallgroup.org.uk/newsletter-new.htm With
the display statement removed the spaces go but the lines are not full. How can I fix this?

Thanks to all that replied .
height: 1%;
fixed the problem.

Albert
Jul 21 '05 #5

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

Similar topics

0
1424
by: Mitch | last post by:
Here is the basic scenario: - Configuration data is gathered from Oracle servers then ftp'd to my apache / mysql server. - The apache / mysql server receives the datafile from the Oracle clients and loads the data into a MySQL database. - The webpages are coded using PHP, SQL, and some JavaScript.
699
34267
by: mike420 | last post by:
I think everyone who used Python will agree that its syntax is the best thing going for it. It is very readable and easy for everyone to learn. But, Python does not a have very good macro capabilities, unfortunately. I'd like to know if it may be possible to add a powerful macro system to Python, while keeping its amazing syntax, and if it could be possible to add Pythonistic syntax to Lisp or Scheme, while keeping all of the...
3
1149
by: Howard | last post by:
Help, How Do I diplay '&' as text on a comand Button !
0
933
by: moumita | last post by:
How to diplay a bitmap on form load. I want to display multiple bitmaps treating the form as a xy coordinate form. How do I scale a form as a xy coordinate screen.On various positions I want to display the bitmaps. Do you have a sample code for tht.
2
3061
by: Jake Barnes | last post by:
Using javascript closures to create singletons to ensure the survival of a reference to an HTML block when removeChild() may remove the last reference to the block and thus destory the block is what I'm hoping to achieve. I've never before had to use Javascript closures, but now I do, so I'm making an effort to understand them. I've been giving this essay a re-read: http://jibbering.com/faq/faq_notes/closures.html
4
2012
by: ksukhonosenko | last post by:
This message was originally posted to comp.lang.c++.moderated ---------------------------------------------------------------------------------------------- Hi! I face a problem in my production code. I could deduce this problem to program shown below. It seems, that try-block in constructor doesnt work as it should (compared to case where no try block exists at all). I tested this small program on my MSVC .NET Pro 2003 (and separately...
15
2100
by: lucky | last post by:
Hi Guys You are probably my last chance to avoid getting crazy To help you understand my problem I have put images online showing the issue I have: http://www.australix.net/images/pb I have an XML file containing links and I use an XSL file to build a
15
3167
by: cssExp | last post by:
hello, Rather than going on a wild explanation on what's the the problem, it'll be much quicker and easier if i let you look at it yourself, so I'll post my page source (actual contents taken out, of course). <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Language" content="en-us" />
0
1320
by: daddyb1 | last post by:
RE: http://www.thescripts.com/forum/thread491642.html ###email removed### May 16th, 2006 10:35 AM Hi, Using Console.Writeline, as while ((strLine = stream.ReadLine()) != null) { sb.Append(strLine); Console.WriteLine(strLine); } this writes all the data to the screen at one go. Is there away to
0
9688
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9544
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10030
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9077
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7570
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6809
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5467
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
4145
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3761
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.