This is a discussion on "Styles in classes?" within the Web Page Design section. This forum, and the thread "Styles in classes? are both part of the Design Your Website category.
|
|
|
|
|
![]() |
||
Styles in classes?
|
||
| Notices |
![]() |
|
|
LinkBack | Thread Tools |
|
|||
|
Styles in classes?
I'm trying to get a number of rectangles below eachother that all get a green border on rollover. I've put them all inside separate divs and have succeeded in making these rectangles but I wanted to place em all inside a class so that i could use em repetitively. But things are going wrong.
Can u put style aspects inside classes? I can't do an id cos i use it more than once. Any help? Cheers. Last edited by timmytots; Dec 1st, 2005 at 17:31. |
|
|
|
|||
|
Re: Styles in classes?
Yes, you can put any css inside a class.
What exactly is going wrong? |
|
||||
|
Re: Styles in classes?
I always find in situations like this, t's best to post your code, or far more preferabally, give a URL.
__________________
Rob - SEO Specialist Owner & Founder of Webforumz.com I am currently unavailable for private work
Last Blog Entry: Creative Labs threaten developer over home made drivers.... (Apr 1st, 2008)
|
|
||||
|
Re: Styles in classes?
Like this?
<div class="name" style="margin:10px; border:1px solid #ccc;">content</div> Yes, no? |
|
|||
|
Re: Styles in classes?
http://www.crewsfx.com/gallery/interactive.html
I was trying to get it so that the individual rectangles' borders went green on rollover. Is that possible, whilst keeping them under one class? Now I can't seem to get the block of text at bottom centred. I've tried divs in every place. Infuriating. Also, is there a way of getting the text within each rectangle to be aligned centred vertically? I tried vertical-align: middle; to no avail. |
![]() |
| Tags |
| styles, classes |
| Thread Tools | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| CSS conflicting styles | ttaxi | Web Page Design | 2 | Mar 28th, 2008 16:01 |
| Attaching styles/classes to Javascript. Help! | super8kid | Web Page Design | 1 | Sep 14th, 2006 14:53 |
| who wants to talk about css print styles? | PixelLuv | Web Page Design | 4 | Jul 14th, 2006 14:51 |
| styles on tables | cyberseed | Web Page Design | 12 | May 23rd, 2006 16:34 |
| Need Help with styles and where to start on this mess... | EAndrews | Web Page Design | 10 | Nov 7th, 2005 20:46 |