navigation
a webmaster learning community
     Home    Register     Search      Help      Login    
Sponsors

Shopping Cart Software
Ecommerce software integrated into Frontpage, Dreamweaver and Golive templates. No monthly fees and available in ASP and PHP versions.

Website Templates
We also have a wide selection of Dreamweaver, Expression Web and Frontpage templates as well as webmaster tools and CSS layouts.

Frontpage website templates
Creative Website Templates for FrontPage, Dreamweaver, Flash, SwishMax

Search Forums
 

Advanced search
Recent Posts

 Todays Posts
 Most Active posts
 Posts since last visit
 My Recent Posts
 Mark posts read

Microsoft MVP

 

lines

 
View related threads: (in this forum | in all forums)

Logged in as: Guest
Users viewing this topic: none
Printable Version 

All Forums >> Web Development >> Cascading Style Sheets >> lines
Page: [1]
 
curious monkey

 

Posts: 543
Joined: 4/28/2006
From: The lower handle of US
Status: offline

 
lines - 5/23/2006 12:44:49   
is there a way just to draw a line in CSS, not a border around something but just a line?

_____________________________

The way it is now, the asylums can hold all the sane people but if we tried to shut up the insane we should run out of building materials.
rdouglass

 

Posts: 9224
From: Biddeford, ME USA
Status: offline

 
RE: lines - 5/23/2006 12:47:49   
<hr style="width:50%;left:20px;"> (an example)

Something like that perhaps? The <hr> element does support CSS styles.

That help?

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to curious monkey)
jaybee

 

Posts: 14152
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: lines - 5/23/2006 13:06:49   
If you're going for xhtml then make sure you close it.

<hr />

or with Roger's style above

<hr style="width:50%;left:20px;" />

If it's going in an external stye sheet then put it in as:

hr {width:50%;left:20px;}

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to rdouglass)
Tailslide

 

Posts: 6032
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: lines - 5/23/2006 13:27:57   
I do this:

hr {border:0; color: #ccc;background-color: #ccc;height: 1px; }


I have no idea why - pretty sure it was to make it work cross-browser as there are some "issues"

_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to jaybee)
jaybee

 

Posts: 14152
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: lines - 5/23/2006 13:48:29   
Yes there are issues. It's to do with FF rendering the line differently to IE. SURPRISE!!!

I have
hr{height:5px; color:#cc99ff;border: 1px solid #ffffcc;}
the idea being that it's a lilac coloured line with a cream coloured border. FF gives me the border with a blank middle. One example of IE rendering better than FF.

(I shall now go and wash my mouth out with carbolic)

Whoa! I've just noticed what Opera does with it. Same as FF but it ignores floats and goes straight through them. :)

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to Tailslide)
jaybee

 

Posts: 14152
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: lines - 5/23/2006 14:01:17   
Right, to have a background for the line, IE uses color, all the others use background-color so to have them appear the same in all browsers you need to specify both so my style line above becomes:

hr{height:5px;
color:#cc99ff;
background-color:#cc99ff;
border: 1px solid #ffffcc;}

Still doesn't help with Opera ignoring the floats though.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to jaybee)
curious monkey

 

Posts: 543
Joined: 4/28/2006
From: The lower handle of US
Status: offline

 
RE: lines - 5/23/2006 14:17:12   
Thanks I appreciate it.
now if i can just convince my employeer to let download FF!:)

_____________________________

The way it is now, the asylums can hold all the sane people but if we tried to shut up the insane we should run out of building materials.

(in reply to jaybee)
jaybee

 

Posts: 14152
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: lines - 5/23/2006 14:23:08   
You need it for testing purposes.

_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to curious monkey)
curious monkey

 

Posts: 543
Joined: 4/28/2006
From: The lower handle of US
Status: offline

 
RE: lines - 5/23/2006 14:39:07   
they don't care...

oh well


_____________________________

The way it is now, the asylums can hold all the sane people but if we tried to shut up the insane we should run out of building materials.

(in reply to jaybee)
Tailslide

 

Posts: 6032
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: lines - 5/23/2006 14:45:11   
tell 'em that it's more likely to work properly in IE7 if you can check it against a good browser like FF - unless they'd prefer you to download the beta!

_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to curious monkey)
curious monkey

 

Posts: 543
Joined: 4/28/2006
From: The lower handle of US
Status: offline

 
RE: lines - 5/23/2006 15:01:12   
speaking to them about web stuff is like explaining a bowel movement to a child. they just know its there, have no idea how it got there or why, but it's there.

_____________________________

The way it is now, the asylums can hold all the sane people but if we tried to shut up the insane we should run out of building materials.

(in reply to Tailslide)
Tailslide

 

Posts: 6032
Joined: 5/10/2005
From: Out here on the raggedy edge
Status: offline

 
RE: lines - 5/23/2006 15:05:19   
quote:

ORIGINAL: curious monkey

speaking to them about web stuff is like explaining a bowel movement to a child. they just know its there, have no idea how it got there or why, but it's there.


That's a classic line - I will be stealing it often!

_____________________________

"My strategy is so simple an idiot could have devised it"
Little Blue Plane Web Design | Blood, Sweat & Rust - A Land Rover restoration project

(in reply to curious monkey)
curious monkey

 

Posts: 543
Joined: 4/28/2006
From: The lower handle of US
Status: offline

 
RE: lines - 5/23/2006 15:35:05   
thanks...:):)

_____________________________

The way it is now, the asylums can hold all the sane people but if we tried to shut up the insane we should run out of building materials.

(in reply to Tailslide)
curious monkey

 

Posts: 543
Joined: 4/28/2006
From: The lower handle of US
Status: offline

 
RE: lines - 5/23/2006 15:41:49   
hmmm.... does the <hr> tag not validate?

quote:

Error Line 71 column 8: end tag for element "HR" which is not open.
<hr></hr>


but there's the <hr> right infront of it!


< Message edited by curious monkey -- 5/23/2006 16:04:44 >


_____________________________

The way it is now, the asylums can hold all the sane people but if we tried to shut up the insane we should run out of building materials.

(in reply to curious monkey)
rdouglass

 

Posts: 9224
From: Biddeford, ME USA
Status: offline

 
RE: lines - 5/23/2006 16:08:46   
quote:

<hr></hr>


Needs to be <hr />

_____________________________

Don't take you're eye off your final destination.

ASP Checkbox Function Tutorial.

(in reply to curious monkey)
jaybee

 

Posts: 14152
Joined: 10/7/2003
From: Berkshire, UK
Status: offline

 
RE: lines - 5/23/2006 16:16:41   
Some things have an opening and closing tag

<li>list item</li>
<p>paragraph</p>

Horizontal rule, line break are just specified with a single tag

<hr>
<br>

In Xhtml they have to be closed so you do it by putting a space followed by a /

<hr />
<br />




_____________________________

If it ain't broke..... fix it until it is.
:)

:)
GAWDS
Now where did I put that Doctype?

(in reply to rdouglass)
curious monkey

 

Posts: 543
Joined: 4/28/2006
From: The lower handle of US
Status: offline

 
RE: lines - 5/23/2006 16:20:39   
oh i get it now. i thought when you guys were saying to close it it was </hr>:)





whoop whoop. Im valid!:):)

(in reply to jaybee)
Page:   [1]

All Forums >> Web Development >> Cascading Style Sheets >> lines
Page: [1]
Jump to: 1





New Messages No New Messages
Hot Topic w/ New Messages Hot Topic w/o New Messages
Locked w/ New Messages Locked w/o New Messages
 Post New Thread
 Reply to Message
 Post New Poll
 Submit Vote
 Delete My Own Post
 Delete My Own Thread
 Rate Posts