Forum Articles
  Welcome back Join CF
You are here You are here: Home | Forum | CSS can you suggest?

You are currently viewing our boards as a guest which gives you limited access to view most of the discussions, articles and other free features. By joining our Virgin Media community you will have full access to all discussions, be able to view and post threads, communicate privately with other members (PM), respond to polls, upload your own images/photos, and access many other special features. Registration is fast, simple and absolutely free so please join our community today.


Welcome to Cable Forum
Go Back   Cable Forum > Computers & IT > Internet Discussion
Register FAQ Community Calendar

CSS can you suggest?
Reply
 
Thread Tools
Old 13-02-2005, 16:14   #1
ikthius
Inactive
 
ikthius's Avatar
 
Join Date: Mar 2004
Location: Glasgow, Scotland
Services: anything for a new job
Posts: 4,165
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
CSS can you suggest?

hey everyone,

I am currently trying to re write my site, using CSS, and I have been looking for the CSS equivelent of the horizontal rule <HR>

can anyone tell me how to do this ins css, I am looking for 5px high, and width of 85%

I tried this but to no avail:
hr {text-align:center width:85pc height:5px}

text-align is the only align I can find, align itself does not work
I thought pc is for percent
height i thnik I have right.

what am I doing wrong?
my html looks like this:
<hr></hr>

also can you design tables in css?

ik
ikthius is offline   Reply With Quote
Advertisement
Old 13-02-2005, 16:43   #2
punky
Inactive
 
Join Date: Jun 2003
Age: 45
Posts: 14,750
punky has a golden aurapunky has a golden aura
punky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aura
Re: CSS can you suggest?

Ok, a few points:

1. HR doesn't need a closing tag, so only <hr> is needed
2. They auto centre align (or should do.)

I have just written this and tested it in FireFox and IE and it works

CSS:

Code:
hr {
width:55%;
height:5px;
}
HTML:
Code:
<hr>
Second point, you can use CSS in tables. Just use the table element tags (table, tr, td), like the HR one above, like:

Code:
table {
...
}
or combining multiple:

Code:
table, td, tr {
...
}
HTH mate.
punky is offline   Reply With Quote
Old 13-02-2005, 17:01   #3
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: CSS can you suggest?

If you're using XHTML then use <hr />, also to colour the HR then use this CSS:
Code:
	background-color: #248; /* Netscape 6/7, Mozilla */
	color: #248; /* IE */
	border: #248; /* Opera */
Richard M is offline   Reply With Quote
Old 13-02-2005, 17:21   #4
ikthius
Inactive
 
ikthius's Avatar
 
Join Date: Mar 2004
Location: Glasgow, Scotland
Services: anything for a new job
Posts: 4,165
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
Re: CSS can you suggest?

thanks for the replies, but I am not using XHTML.

ik
ikthius is offline   Reply With Quote
Old 13-02-2005, 21:23   #5
Matth
Inactive
 
Join Date: Mar 2004
Services: BB:M, TV:XL, Phone:M, Loyalty
Posts: 2,516
Matth has reached the bronze age
Matth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze age
Re: CSS can you suggest?

Punky's code works in my ediitor preview
also HR STYLE="width: ..... and so on, but you want it as a sheet, presumably, and not per use.

You can also use HR CLASS=, to be able to specify a number of differently styled HR elements. Actually, you can use ID= as well, but indidually enumerating them is unlikely to be of much use.
Matth is offline   Reply With Quote
Old 14-02-2005, 08:34   #6
ikthius
Inactive
 
ikthius's Avatar
 
Join Date: Mar 2004
Location: Glasgow, Scotland
Services: anything for a new job
Posts: 4,165
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
Re: CSS can you suggest?

Quote:
Originally Posted by Matth
Punky's code works in my ediitor preview
also HR STYLE="width: ..... and so on, but you want it as a sheet, presumably, and not per use.

You can also use HR CLASS=, to be able to specify a number of differently styled HR elements. Actually, you can use ID= as well, but indidually enumerating them is unlikely to be of much use.
thanks,

I did not need to use an ID or a class, I just used the CSS to target the HR, becuase the pages that the HR is on, there is only one, so I don't need the hr to be different from anything else.

I have finished half of my site, which a lot of code is now gone to CSS, and they load better and look just the same, but essentially they are all the same on:
Firefox
IE
Netscape 7.2
Opera 8 beta

I will need to look into coding for audible browsers, to make the site more accessible friendly.

ik
ikthius is offline   Reply With Quote
Old 14-02-2005, 08:59   #7
punky
Inactive
 
Join Date: Jun 2003
Age: 45
Posts: 14,750
punky has a golden aurapunky has a golden aura
punky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aura
Re: CSS can you suggest?

Quote:
Originally Posted by ikthius
I will need to look into coding for audible browsers, to make the site more accessible friendly.
Yeah, that is a legal requirement now these days
punky is offline   Reply With Quote
Old 14-02-2005, 12:27   #8
ikthius
Inactive
 
ikthius's Avatar
 
Join Date: Mar 2004
Location: Glasgow, Scotland
Services: anything for a new job
Posts: 4,165
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
Re: CSS can you suggest?

another wee thing, I have topstyle to help me with some code, but I can't for the life of me find what I am looking for
pic 1 is done on html and pic 2 is using css, how can I get the table bang in centre of screen and how can I get the table borders to show?

I tried border:2px; border-style:groove;
but this just gave a border, but no internal lines.

ik
ikthius is offline   Reply With Quote
Old 14-02-2005, 13:25   #9
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: CSS can you suggest?

td {
border: 2px #aaa groove;
}

Replace #aaa with whichever colour.
Richard M is offline   Reply With Quote
Old 14-02-2005, 13:54   #10
ikthius
Inactive
 
ikthius's Avatar
 
Join Date: Mar 2004
Location: Glasgow, Scotland
Services: anything for a new job
Posts: 4,165
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
Re: CSS can you suggest?

thanks richard,

but how do I get it in the centre?in my body I have text-align:center, but I guess this is just for text, how do I do it with a table

ik
ikthius is offline   Reply With Quote
Old 14-02-2005, 15:14   #11
Richard M
Inactive
 
Join Date: Jun 2003
Location: Los Angeles, CA
Age: 47
Posts: 6,343
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Richard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze arrayRichard M has a bronze array
Re: CSS can you suggest?

table {
width: 90% /* example */
margin-left: auto;
margin-right: auto;
}
Richard M is offline   Reply With Quote
Old 14-02-2005, 15:22   #12
ikthius
Inactive
 
ikthius's Avatar
 
Join Date: Mar 2004
Location: Glasgow, Scotland
Services: anything for a new job
Posts: 4,165
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
Re: CSS can you suggest?

cheers mate, I was playing about with everything but the 2 of them together, sometimes you just need to be pushed in the right direction.

reps to you mate.

ik
ikthius is offline   Reply With Quote
Old 14-02-2005, 18:49   #13
Matth
Inactive
 
Join Date: Mar 2004
Services: BB:M, TV:XL, Phone:M, Loyalty
Posts: 2,516
Matth has reached the bronze age
Matth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze ageMatth has reached the bronze age
Re: CSS can you suggest?

Cascade DTP is another program that may be of interest when developing with CSS
Matth is offline   Reply With Quote
Old 14-02-2005, 19:04   #14
punky
Inactive
 
Join Date: Jun 2003
Age: 45
Posts: 14,750
punky has a golden aurapunky has a golden aura
punky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aurapunky has a golden aura
Re: CSS can you suggest?

I don't know if you use Firefox, but there are a couple of awesome plugins which make developing web pages a lot less hassle.

Web Developer 0.8

EditCSS 0.2.3
punky is offline   Reply With Quote
Old 14-02-2005, 20:56   #15
ikthius
Inactive
 
ikthius's Avatar
 
Join Date: Mar 2004
Location: Glasgow, Scotland
Services: anything for a new job
Posts: 4,165
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
ikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronzeikthius is cast in bronze
Re: CSS can you suggest?

cheers punky

I do infact use firefox, and I have the web developer, but I forgot about using it, but not heard of the editcss, so I have downloaded it

reps to you.

ik
ikthius is offline   Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:26.


Server: lithium.zmnt.uk
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
All Posts and Content are © Cable Forum