473,397 Members | 2,056 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,397 software developers and data experts.

Problem with the <hr /> - Tag in XHTML

Hi everyone,

I have a problem with the <hr /> - TAG. My aim is to produce a thin line
with 1px height. That's no problem, with CSS it is working well.
width: 170px;
height: 1px;
overflow: hidden;
border: solid 0px #D4E061;
background: #D4E061;
color: #D4E061;
line-height: 1px;
font-size: 1px;

padding: 0px;
margin: 0px;

The probem I have is that the padding/margin thing is not working in the
IE there is always too much space over or under the line.

Is there a possibility to disable this behaviour?
Greetings from Matthias
Jan 19 '06 #1
4 4664
Tim
On Thu, 19 Jan 2006 09:33:02 +0100, Matthias Göbels sent:
padding: 0px;
margin: 0px;

The probem I have is that the padding/margin thing is not working in the
IE there is always too much space over or under the line.


Your issue is probably due to the styling of the other elements adjacent
to the HR. We don't have enough information about your problem page to
diagnose.

--
If you insist on e-mailing me, use the reply-to address (it's real but
temporary). But please reply to the group, like you're supposed to.

This message was sent without a virus, please destroy some files yourself.

Jan 19 '06 #2
Matthias Göbels <fr****@frixxx.de.nospam> wrote:
I have a problem with the <hr /> - TAG.
There are very few situations where usage of <hr> markup is justified,
most often it is used in a presentational manner. Presentation is the
task of CSS, not markup.
My aim is to produce a thin line
with 1px height.
Then don't use <hr>, set a top or bottom border on the adjacent block
level element.
padding: 0px;
margin: 0px;

The probem I have is that the padding/margin thing is not working in the
IE there is always too much space over or under the line.


IE only allows limited styling of the <hr> element, there's nothing that
you can do about it.

--
Spartanicus
Jan 19 '06 #3
Matthias Göbels wrote:

I have a problem with the <hr /> - TAG. My aim is to produce a thin line
with 1px height. That's no problem, with CSS it is working well.
You'd probably do better using a 1px top or bottom border instead of hr.
IE there is always too much space over or under the line.


That's a side effect of IE's broken overflow behavior. Unless you set
overflow:hidden, it expands the height to minimum 1 line, per whatever
font it happens to be using.

--
Reply email address is a bottomless spam bucket.
Please reply to the group so everyone can share.
Jan 19 '06 #4
On Thu, 19 Jan 2006 13:03:52 GMT, Spartanicus <in*****@invalid.invalid>
wrote:
There are very few situations where usage of <hr> markup is justified,


Oh, use the bloody thing and stop worrying about it (search back to
November in c.i.w.a.s for a longer explanation of why).
<http://groups.google.com/group/comp.infosystems.www.authoring.stylesheets/browse_frm/thread/a13ca7b142c71469/defd2f3e1f2b2336?lnk=st&q=%3Chr+group%3Acomp.infos ystems.www.authoring.stylesheets+author%3Aandy+aut hor%3Adingley&rnum=1&hl=en#defd2f3e1f2b2336>

The web is broken. The world sucks. There isn't a clean split between
HTML and CSS. Get over it.

Jan 20 '06 #5

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

Similar topics

4
by: Angelos | last post by:
Hello again.... I am coding php in dreamweaver. And because I like to use it for the HTML parts I want my HTML code to be unquoted and not into echo statements. BUT I ended up in something like...
34
by: Mark Moore | last post by:
It looks like there's a pretty serious CSS bug in IE6 (v6.0.2800.1106). The HTML below is validated STRICT HTML 4.01 and renders as I would expect in Opera, FrontPage, and Netscape. For some...
2
by: Jeremy Collins | last post by:
Hi all, How do I specify "noshade" as the style for an <HR> element in my style sheet? hr { height: 1px; color: #EEEEEE; ???? }
11
by: Ted Mayett | last post by:
OK. Here is a glitch, sorry if this has been mentioned before. This is an erratic glitch. I am now up to three other people besides myself who have been able to see this glitch. It seems it...
1
by: Matthias Göbels | last post by:
Hi everyone, I have a problem with the <hr /> - TAG. My aim is to produce a thin line with 1px height. That's no problem, with CSS it is working well. width: 170px; height: 1px; overflow:...
20
by: AndyZa | last post by:
Is the following html valid? <p><hr width="50%"></p> Or would the following be more "technically correct"? <p> <hr width="50%"> Do I require the closing </p> tag?
3
by: balakrishnan.dinesh | last post by:
hi frnds, In my html code, i have used <hrtag. Im using it as "<hr color=red>", So the respective hr line color is red in Mozila and IE browsers, But it is not showing the color in Opera browser,...
13
by: Mich | last post by:
Hi, 1) i defined a html line in the aspx file like this but it's still visible:: <hr id="hr1" visible="false" /> So i defined it like this and now it's hidden: <hr id="hr1"...
3
by: ajay2552 | last post by:
Hi, I have a query. All html tags start with < and end with >. Suppose i want to display either '<' or '>' or say some text like '<Company>' in html how do i do it? One method is to use &lt,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
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,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
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...
0
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...

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.