I have been bashing my head against this for a while. I'm a fairly huge novice when it to this so thought it was time to ask for help.
Trying to select all imgs on a page that are set at their default value (unclear if this is auto or initial, because it seems auto is applied by default and the console only shows width with nothing else after) and apply a size to them.
I want this to exclude imgs that I have manually set the size of.
So far I have tried this for my CSS, but it doesn't seem to work.
img:not([width:initial]){
width: 400px;
}
HTML SECTION OF PAGE WITH IMAGE:
<div class="internal-embed image-embed is-loaded" tabindex="-1"
src="TeniaeColiHisto.png" alt="TeniaeColiHisto.png" width=""
height="" contenteditable="false"><img width="" src="app://local
/D%3A%5CSecondBrain%5CImages%5CTeniaeColiHisto.png?1642441174361"
alt="TeniaeColiHisto.png" height=""></div>
<img width=""
src="app://local/D%3A%5CSecondBrain%5CImages%5CTeniaeColiHisto.png?1642441174361"
alt="TeniaeColiHisto.png" height="">
Edit: Made some headway with:
img[width]
{
width: 400px;
}
It seems I would solve my issue if the following would work but for some reason it doesn't?
img[width]not:([width=""])
{
width: 400px;
}
EDIT SOLUTION: Turns out the program i'm using doesn't actually automatically set the width of the images. It just inherits them from the source and the actual HTML includes no width or height tag.Thus, the solution was to specify all images that did not these attributes as such.
img:not([width])
{
width:400px;
}