Web Design Forum: how to create dividing lines - Web Design Forum

Jump to content

WDF
WDF Premium Memberships Reseller Hosting
Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

how to create dividing lines

#1 User is offline   ben_faulkner 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 86
  • Joined: 01-June 09
  • Reputation: 0
  • Experience:Nothing
  • Area of Expertise:Designer

Posted 07 January 2010 - 02:22 PM

i want to create a dividing line between text sections such as in:

http://www.channel4.com/blogs/

if i put the following into my HTML it works but the line still comes out black (in firefox)

<hr style="clear: both; margin-left: 0px; margin-right: 0px; margin-top: 5px; margin-bottom: 5px; color:#CCC">


ideally i would like to put a 2px dividing line between all sections. the first px being a dark colour and the 2nd being a lighter colour to create a kind of bevel effect.

any help would be great. Im guessing i should be doing this in CSS somehow anyway instead of HTML.

(i do not want to create a separate div for each text section)

Thanks
0

#2 User is offline   MrBrightside 

  • Expert
  • PipPipPipPip
  • Group: Members
  • Posts: 855
  • Joined: 05-May 09
  • Reputation: 25
  • Gender:Male
  • Location:In the Diary of Jane
  • Experience:Web Guru
  • Area of Expertise:Designer/Coder

Posted 07 January 2010 - 02:44 PM

They are using a list with a bottom border under each item.
If you wanted to use a <hr/> you'd apply a border to that too.

Try this:
<hr style="border:none;border-top:1px solid #666;border-bottom:1px solid #ccc;" />


border:none first resets the original borders (which include side borders), then you set two different colours on the element.
0

#3 User is offline   ben_faulkner 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 86
  • Joined: 01-June 09
  • Reputation: 0
  • Experience:Nothing
  • Area of Expertise:Designer

Posted 07 January 2010 - 02:50 PM

ah thanks for that, border:none to reset!

can i add margins to the top and bottom of this to space it away from the text a bit?
0

#4 User is offline   ben_faulkner 

  • Forum Newcomer
  • Pip
  • Group: Members
  • Posts: 86
  • Joined: 01-June 09
  • Reputation: 0
  • Experience:Nothing
  • Area of Expertise:Designer

Posted 07 January 2010 - 02:52 PM

not to worry, same principle. thanks!
0

Share this topic:


Page 1 of 1
  • You cannot start a new topic
  • You cannot reply to this topic

2 User(s) are reading this topic
0 members, 2 guests, 0 anonymous users