473,378 Members | 1,482 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,378 software developers and data experts.

Horizontal line display resolution help

21
I am trying to display a horizontal line using CSS and the results are fine when viewed with Mozilla Firefox 2.0, but not in IE6. I am not able to control the line height in IE6. In the test code below, I also included the deprecated properties code which works fine in both browsers. Any help to switching to CSS is greatly appreciated.

ineuw

<html>
<head>

<style type="text/css">

div.hr {
background-color: #ff0080;
border: 0px;
clear: left;
color: #ff0080;
float: left;
height: 5px;
margin: 4px 0px 4px 0px;
width: 100%;
}

</style>

</head>
<body>

<br>
<br>

<!-- deprecated mode works fine in both Firefox and IE -->
deprecated display
<div><hr size="5" color="#ff0080" bgcolor="#ff0080" width="100%"></div>
<br>
<br>

<!-- line-height of 5px in the css has no effect in IE -->
css display
<div class="hr"></div>
</body>
</html>
Jan 2 '08 #1
3 1960
drhowarddrfine
7,435 Expert 4TB
This is another margin bug with IE but, I haven't run into it in so long, I don't remember the details. I'll try and look it up.
Jan 2 '08 #2
mrhoo
428 256MB
The simplest way to display a styled horizontal line is to define the top or bottom border of a div with css.
Jan 3 '08 #3
ineuw
21
Thanks for all who replied.

mrhoo is correct when he advised: "The simplest way to display a styled horizontal line is to define the top or bottom border of a div with css." Also, there was an error with the CSS definition, as someone pointed out that there can't be <div class="hr">

Here is the corrected code below, which works fine in bot Mozilla and IE^

Thanks again


<html>
<head>

<style type="text/css">

hr.logo
{
background-color: #ff0080;
border: 0px;
clear: left;
color: #ff0080;
float: left;
height: 5px;
margin: 4px 0px 4px 0px;
width: 100%;
}

</style>

</head>
<body>

<br>
<br>

<!-- deprecated mode works fine in both Firefox and IE -->
deprecated
<div><hr size="5" color="#ff0080" bgcolor="#ff0080" width="100%"></div>
<br>
<br>

<!-- line-height of 5px in the css has no effect in IE -->
css
<hr class="logo" />
</body>
</html>
Jan 3 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Peter Mount | last post by:
Hi When I zoom into my site (http://www.petermount.au.com) with Opera 7.54 the horizontal scrollbar doesn't show when the site image is bigger than my screen. Yet the horizontal scrollbar shows...
2
by: Griff | last post by:
What I'm trying to achieve is to have a title followed by a horizontal rule on the same line. For example: Living on Mars ---------------- Living on Mars would be at best impractical for the...
0
by: itzikkl | last post by:
hello i wanted to ask about the menu control in asp.net 2.0. there is a property "Orientation" in the menu cotrol which specifies the Orientation of the main-uppper-level menu items. than the...
5
by: Chris Beall | last post by:
Objective: Using an HTML list, create a horizontal nav menu with these characteristics: - All menu items have the same width at all times. - When the window width is reduced, the menu items...
2
by: polo | last post by:
Hi i am trying to get a horizontal menu and sub menu in css, which works great on my Firefox But, in order to get around the ie hover bug, i included some javascript which gives me a strange...
2
by: Nidhisharma | last post by:
Hi Folks, I need some help, I have Sales table,SalesRep1 table,productdetail table. Based on these three tables I made a query salesquery where I got the output as required. In Sales table there...
2
by: pbd22 | last post by:
Hi. I am trying to make a horizontal list that counts (downward) and a horizontal list that illustrates the time. Both list should be formatted the same (except for the nomenclature). I seem to...
0
by: mjohnson0321 | last post by:
I am trying to incorporate a CSS drop-down menu into a site (suckerfish menu). The menu gets lost behind the content below it, but only on one of the drop downs (News). The error occurs on all of...
1
by: RFleming | last post by:
Hello, I know this is not directly related to javascript, but I am not awayre of a good group for handling web control questions. I have been trying to get a textbox to work now for over a week,...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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: 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.