Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 8 posts ] 
Author Message
 Post subject: css
PostPosted: November 20th, 2009, 2:29 am 
Bronze Member
Offline

Joined: November 18th, 2009, 10:38 pm
Posts: 1 in
RS Name: banikian
RS Status: F2P
How can i restrict one part of the code in html without getting affected by css without modifying .css file. It;s like disabling style changes for the particular block in html. i need to do for a div.
__________________
market samurai ~ marketsamurai ~ marketsamurai.com


Last edited by banikian on November 27th, 2009, 12:28 am, edited 1 time in total.

Top
 Profile  
 
 Post subject: Register and login to get these in-post ads to disappear
PostPosted: November 20th, 2009, 2:29 am 
Bronze Member

Joined: September 9th, 2004, 1:47am
Posts: 9047
Location: In your web browserz


Top
  
 
 Post subject: Re: css
PostPosted: November 20th, 2009, 3:27 am 
Rsbandb Donor
Offline

Joined: October 25th, 2004, 10:12 pm
Posts: 3055
Location: New Zealand nz
RS Name: Chief. Snake
RS Status: Retired
Clan Name: Bits and Bytes
I think the most straightforward answer is that you can't simply disable the CSS for a single element. You'd need to give it some CSS to reset its styles manually, which can be fairly easy to do if you use something like Firebug. Firebug can show you all of the CSS properties that an element has been given, so from there you would just go through each of the properties and negate them.

_________________


Top
 Profile  
 
 Post subject: Re: css
PostPosted: November 20th, 2009, 5:14 pm 
Rsbandb Donor
User avatar
Offline

Joined: August 18th, 2008, 12:19 pm
Posts: 357
Location: England england
RS Name: VettelS
RS Status: P2P
Like this?

<div style="none">

_________________
My blog


Top
 Profile  
 
 Post subject: Re: css
PostPosted: November 20th, 2009, 5:48 pm 
Rsbandb Donor
Offline

Joined: October 25th, 2004, 10:12 pm
Posts: 3055
Location: New Zealand nz
RS Name: Chief. Snake
RS Status: Retired
Clan Name: Bits and Bytes
That won't do anything? :-s

_________________


Top
 Profile  
 
 Post subject: Re: css
PostPosted: November 24th, 2009, 11:33 am 
Rsbandb Donor
User avatar
Offline

Joined: August 18th, 2008, 12:19 pm
Posts: 357
Location: England england
RS Name: VettelS
RS Status: P2P
style="none" overrides other CSS styles, therefore the block in question receives no styling.

_________________
My blog


Top
 Profile  
 
 Post subject: Re: css
PostPosted: November 24th, 2009, 7:02 pm 
Rsbandb Donor
Offline

Joined: October 25th, 2004, 10:12 pm
Posts: 3055
Location: New Zealand nz
RS Name: Chief. Snake
RS Status: Retired
Clan Name: Bits and Bytes
Are you sure? That shouldn't logically work and it doesn't for me having tested it. :P

When you add to the style attribute, the correct notation is style="property: value". This is the same as writing in a CSS file:
element (selector) {
    property: value;
}

By writing "none" where "property: value" is expected, the CSS is invalid. This could potentially cause the CSS to break and this may be where you find that style="none" works, but it doesn't seem to for me; it just has no effect.

_________________


Top
 Profile  
 
 Post subject: Register and login to get these in-post ads to disappear
PostPosted: November 24th, 2009, 7:02 pm 
Rsbandb Donor

Joined: September 9th, 2004, 1:47am
Posts: 9047
Location: In your web browserz


Top
  
 
 Post subject: Re: css
PostPosted: November 25th, 2009, 2:58 am 
Runite Member
Offline

Joined: September 3rd, 2007, 12:42 am
Posts: 564
Location: Anchorage, AK
RS Name: Addiv
RS Status: P2P
Wouldn't adding style="" to all styled elements take care of this?

_________________
Image
SKOTM wins: Herblore | Farming | Mining


Top
 Profile  
 
 Post subject: Re: css
PostPosted: November 25th, 2009, 1:10 pm 
Rsbandb Donor
Offline

Joined: October 25th, 2004, 10:12 pm
Posts: 3055
Location: New Zealand nz
RS Name: Chief. Snake
RS Status: Retired
Clan Name: Bits and Bytes
No as you'd only be adding to the styles already present. If a style attribute is left blank then you're not adding anything; the style is untouched. The style attribute in HTML does have precedence over any externally applied CSS though so all you need to do is negate the current styles from there (unless you've used !importants.. those are messy but just add some more and you'll be fine :P ).

_________________


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies. Forum Index » Off-Topic » Non-RuneScape Discussion » Troubleshooting » css Page 1 of 1 [ 8 posts ]

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to: