472,962 Members | 2,957 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,962 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 4638
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,...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 4 Oct 2023 starting at 18:00 UK time (6PM UTC+1) and finishing at about 19:15 (7.15PM) The start time is equivalent to 19:00 (7PM) in Central...
0
tracyyun
by: tracyyun | last post by:
Hello everyone, I have a question and would like some advice on network connectivity. I have one computer connected to my router via WiFi, but I have two other computers that I want to be able to...
2
by: giovanniandrean | last post by:
The energy model is structured as follows and uses excel sheets to give input data: 1-Utility.py contains all the functions needed to calculate the variables and other minor things (mentions...
3
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be using a very simple database which has Form (clsForm) & Report (clsReport) classes that simply handle making the calling Form invisible until the Form, or all...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 1 Nov 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM) Please note that the UK and Europe revert to winter time on...
3
by: nia12 | last post by:
Hi there, I am very new to Access so apologies if any of this is obvious/not clear. I am creating a data collection tool for health care employees to complete. It consists of a number of...
0
NeoPa
by: NeoPa | last post by:
Introduction For this article I'll be focusing on the Report (clsReport) class. This simply handles making the calling Form invisible until all of the Reports opened by it have been closed, when it...
0
isladogs
by: isladogs | last post by:
The next online meeting of the Access Europe User Group will be on Wednesday 6 Dec 2023 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, Mike...
2
by: GKJR | last post by:
Does anyone have a recommendation to build a standalone application to replace an Access database? I have my bookkeeping software I developed in Access that I would like to make available to other...

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.