Jump to content

Css exclude

stefanmz

Hey so there is something like this

<div1>
	<div2>
    	<div3>
        	<div4>

well it doesn't appear right but these are 4 divs which are in div1 all of them are inside div1. I need to select div1 without div3 for example. Can I do that(they all have different classes)? Also let's say the part that is div1 without div3 cannot be selected on its own. So how do I do that? I really need a way to do that.

Link to comment
Share on other sites

Link to post
Share on other sites

I have a very hard time understanding what you're trying to do. I guess it's the same for others. What is your actual goal here?

 

Could you elaborate a bit more what it is you're trying to do? Are you talking about selecting stuff in a text editor/IDE or are you talking about selecting stuff on the resulting web page?

 

4 hours ago, stefanmz said:

well it doesn't appear right but these are 4 divs which are in div1 all of them are inside div1.

I assume you mean you have four divs in total and three of them are inside the first div, e.g.

<div> #1
  <div> #2
    <div> #3
      <div> #4
      </div>
    </div>
  </div>
</div>

 

Remember to either quote or @mention others, so they are notified of your reply

Link to comment
Share on other sites

Link to post
Share on other sites

1 hour ago, Eigenvektor said:

Could you elaborate a bit more what it is you're trying to do? Are you talking about selecting stuff in a text editor/IDE or are you talking about selecting stuff on the resulting web page?

I think they're talking about selectors within the stylesheet, i.e. they want to apply a style to the outer div without one of its children inheriting that style.

____________________________________________________________________________________________________________________________________

 

 

____________________________________________________________________________________________________________________________________

pythonmegapixel

into tech, public transport and architecture // amateur programmer // youtuber // beginner photographer

Thanks for reading all this by the way!

By the way, my desktop is a docked laptop. Get over it, No seriously, I have an exterrnal monitor, keyboard, mouse, headset, ethernet and cooling fans all connected. Using it feels no different to a desktop, it works for several hours if the power goes out, and disconnecting just a few cables gives me something I can take on the go. There's enough power for all games I play and it even copes with basic (and some not-so-basic) video editing. Give it a go - you might just love it.

Link to comment
Share on other sites

Link to post
Share on other sites

6 hours ago, pythonmegapixel said:

I think they're talking about selectors within the stylesheet, i.e. they want to apply a style to the outer div without one of its children inheriting that style.

yes exactly

Link to comment
Share on other sites

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×