html5 – Meu HTML não pega o arquivo CSS

Estou com um problema recente, eu realizei toda a marcação do meu site, mas ao realizar a estilização dele, o meu HTML não carrega o CSS. Estou importando o arquivo CSS como abaixo, mas sem sucesso, o html não está pegando.

script

Cheguei a testar arquivos de alguns meses atrás que tenho e que funcionava normalmente, porém hoje nenhum está pegando o CSS também. Como posso resolver esse problema?

Atenciosamente,

How to adjust table column width with CSS

Advertising

y u no do it?

Advertise virtually anything here, with CPM banner ads, CPM email ads and CPC contextual links. You can target relevant areas of the site and show ads based on geographical location of the user if you wish.

Starts at just $1 per CPM or $0.10 per CPC.

javascript – Show/Hide – either JS or CSS – Multiple instances on page with no ID or auto incrementing ID

I have a JS with a Show/Hide element on a page which is written so that end users at my organization can add new content without knowing html/js, therefore the ID can’t be changed for each instance. If the exiting script can be used with an added var to allow the id number to change (+1) for each instance, that would be ideal, however, a new solution is also welcomed.

Existing Script:

<script>
  function showMoreOrLess(thisObj,bonusContent){
    var caption = thisObj.innerHTML;
    //alert(caption);
    if ( caption == "Read more" ) {
        document.getElementById(bonusContent).style.display = "inline";
        thisObj.innerHTML = "Read less";
    } else {
        document.getElementById(bonusContent).style.display = "none";
        thisObj.innerHTML = "Read more";
    }
}
</script>

HTML

<p>lots of intro text here</p>
<span id="1" style="display:none">
    <p>Lorem Ipsum is ...</p>
</span>
<p><a onclick="showMoreOrLess(this,'1');">Read more</a></p>

css – How Can I Append Inline Style to Post Images in WordPress

Simple problem, not sure where to start.

Posts on our website get pulled into an RSS feed and get automatically emailed by an email service. This works perfectly great, except for one thing — normal web size images make our emailed posts look bad on mobile — the images render too big and make the email too wide, such that the text reduces to a smaller size.

I need to add an inline style to uploaded post images:

style="max-width: 100px; max-height: auto;"

This forces any image to be restricted to the width of the div into which we put the content.

I don’t care if the style tag gets added to the images in the post on the website or in the RSS feed, but it needs to be there or it ruins the emailed post on mobile. When I add the style inline myself, it causes the email look great in a mobile display.

Any thoughts on how I can inject this inline style?

html5 – Problema com herança no css

Galera estou com um problema com meu códico, bom quero alterar meu códico pra que todos os elementos fique igual. Porém fui tentar fazer isso com o seguinte códico HTML:

<div class="button_profile">                                   
 <form method="POST" enctype="multipart/form-data" action="/account/upload">                                                  
  <label class="label"><input type="file" name="file">Alterar foto de perfil</label>                                          
  <button type="button">Chat</button>                           
  <a href="mailto:teste@gmail.com?subject=subject">Email</a>                                                   
 </form>                                                      
</div>

E o seguinte códico css:

.button_profile button,label, a{
 width:100%;
 font-family:Arial,Helvetica,sans-serif;
 color:#fff;
 border:2px solid #fff;
 background:#151515;
 text-decoration:none;
 text-transform:uppercase;
 letter-spacing:2px;
 padding:5px;
 margin-top:20px;
 margin-bottom:20px;
}

O problema é que ele está modificando os elementos que estão fora da div e eu não quero isso, porém quando crio uma classe resolve e não quero criar uma classe desnecessária, alguém pode me dizer onde estou errando??? Pela lógica o que estou fazendo é modificar todos os button label e a que são filhos da div button_profile.

bootstrap – Aplicar estilos CSS a ‘react-select’ en ReactJS

Tengo el siguiente codigo:

Como verán, el el Select le apliqué unas propiedades CSS a mano para que se parezca lo mas posible a la clase “form-control-sm” de Bootstrap.

   height: 31,
   minHeight: 31,
   width: "100%",
   fontSize: "0.875rem"

Lo que necesito es centrar el contenido del select verticalmente. Probé darle la propiedad “display: flex” y luego “align-items:center” pero no funciona. vertical-align tampoco.
Y si quisiera darle un padding-bottom en lugar de subir el texto, me agranda la caja del input sin importar que le ponga un mismo min-height y max-height con !important.

En resumen sería subir unos pixceles la palabra “Select…”, el separador y la flechita que se encuentran en el input select.

introducir la descripción de la imagen aquí

css – Product Page not responsive in mobile (Porto Theme)

i created a child theme for Porto theme

responsiveness is working on desktop, but not in mobile. can anybody help me? could i be missing the viewport metatag only in product page? i`m a newbie to magento and frontend development.

it actually loads right, but then suddenly it gets full width again. it`s only when i open a product, other pages are resizing in mobile.

magento2 – Magento 2 fresh install, admin page 404, css 404, js 404

Problem

I’ve got a fresh install of magento 2 on ubuntu 20.04. I followed the install with composer guide on the mangento site. The installer completed with no complaints.

When I head over to my url I get a very sparse looking page with no css or js. A look in the console and network tab shows that the page is trying to load a number of assets but non are found.

GET https://website.com/pub/static/version1606418294/frontend/Magento/luma/en_GB/css/styles-m.css
(HTTP/1.1 404 Not Found 58ms)

Looking into pub/static shows no directory called version1606418294 perhaps this is a clue?

In addition to this heading over to the admin URI that was generated on installation gives a 404 for the whole page.

Things I’ve Tried

changing mode between development / production / default

deploying static content and flushing the cache

php bin/magento setup:upgrade
bin/magento setup:static-content:deploy -f
bin/magento indexer:reindex
bin/magetno cache:flush

these are the current permissions

ls -la
total 1816
drwxrwxrwx 12 magento www-data   4096 Nov 26 19:16 .
drwxr-xr-x  4 root    root       4096 Nov 25 13:09 ..
-rwxrwxrwx  1 magento www-data    188 Nov 26 18:21 .editorconfig
-rwxrwxrwx  1 magento www-data  11281 Nov 26 19:16 .htaccess
-rwxrwxrwx  1 magento www-data  11382 Nov 26 18:21 .htaccess.sample
-rwxrwxrwx  1 magento www-data   1519 Nov 26 18:21 .php_cs.dist
-rwxrwxrwx  1 magento www-data    101 Nov 26 18:21 .user.ini
-rwxrwxrwx  1 magento www-data 766543 Nov 26 18:21 CHANGELOG.md
-rwxrwxrwx  1 magento www-data    650 Nov 26 18:21 COPYING.txt
-rwxrwxrwx  1 magento www-data   2994 Nov 26 18:21 Gruntfile.js.sample
-rwxrwxrwx  1 magento www-data  10364 Nov 26 18:21 LICENSE.txt
-rwxrwxrwx  1 magento www-data  10376 Nov 26 18:21 LICENSE_AFL.txt
-rwxrwxrwx  1 magento www-data    700 Nov 26 18:21 SECURITY.md
drwxrwxrwx  4 magento www-data   4096 Nov 26 18:21 app
-rwxrwxrwx  1 magento www-data    150 Nov 26 18:21 auth.json.sample
drwxrwxrwx  2 magento www-data   4096 Nov 26 18:21 bin
-rwxrwxrwx  1 magento www-data   2634 Sep 23 20:01 composer.json
-rwxrwxrwx  1 magento www-data 937015 Nov 26 18:21 composer.lock
drwxrwxrwx  4 magento www-data   4096 Nov 26 18:21 dev
drwxrwsrwx  3 magento www-data   4096 Nov 26 19:46 generated
-rwxrwxrwx  1 magento www-data     57 Nov 26 18:21 grunt-config.json.sample
-rwxrwxrwx  1 magento www-data   1370 Nov 26 18:21 index.php
drwxrwxrwx  4 magento www-data   4096 Nov 26 18:21 lib
-rwxrwxrwx  1 magento www-data   5842 Nov 26 18:21 nginx.conf.sample
-rwxrwxrwx  1 magento www-data   1416 Nov 26 18:21 package.json.sample
drwxrwxrwx  2 magento www-data   4096 Nov 26 18:21 phpserver
drwxrwxrwx  6 magento www-data   4096 Nov 26 18:21 pub
drwxrwxrwx  7 magento www-data   4096 Nov 26 18:21 setup
drwxrwsrwx  8 magento www-data   4096 Nov 26 19:46 var
drwxrwsrwx 84 magento www-data   4096 Nov 26 18:21 vendor

rewrite module is enabled

a2enmod rewrite 
Module rewrite already enabled

here’s a list of php modules while im at it

php -m
(PHP Modules)
bcmath
calendar
Core
ctype
curl
date
dom
exif
FFI
fileinfo
filter
ftp
gd
gettext
hash
iconv
intl
json
libxml
mbstring
mysqli
mysqlnd
openssl
pcntl
pcre
PDO
pdo_mysql
Phar
posix
readline
Reflection
session
shmop
SimpleXML
soap
sockets
sodium
SPL
standard
sysvmsg
sysvsem
sysvshm
tokenizer
xml
xmlreader
xmlwriter
xsl
Zend OPcache
zip
zlib

(Zend Modules)
Zend OPcache

I read that changing .htacces in the projects root folder to affect symlinks might help, though neither of those two options seems to make any difference.

 13 ############################################                                                                      
 12 ## enable rewrites                                                                                                
 11                                                                                                                   
 10 #    Options +FollowSymLinks                                                                                      
  9 Options +SymLinksIfOwnerMatch                                                                                     
  8                                                                                                                   
  7     RewriteEngine on                                                                                             

added the following to the bottom of /etc/apache2/sites-available/000-default.conf as per magento’s trouble shooting instructions. here and here.

  4   <Directory /var/www/html>                                                                                       
  3           Options Indexes FollowSymLinks                                                                          
  2           AllowOverride all                                                                                       
  1           Require all granted                                                                                     
48    </Directory>    

I logged into mysql to see if magento is speaking to it but it seems to have made a whole bunch of tables so is probably ok?

mysql> show tables;
+------------------------------------------------------+
| Tables_in_magento                                    |
+------------------------------------------------------+
| admin_analytics_usage_version_log                    |
| admin_passwords                                      |
| admin_system_messages                                |
| admin_user                                           |
| admin_user_expiration                                |
| admin_user_session                                   |
| adminnotification_inbox     
.
.
.
| wishlist                                             |
| wishlist_item                                        |
| wishlist_item_option                                 |
| yotpo_order_status_history                           |
| yotpo_rich_snippets                                  |
| yotpo_sync                                           |
+------------------------------------------------------+
404 rows in set (0.02 sec)

I’m pretty much out of ideas, any insight or direction would be greatly appreciated.

css – How do you avoid CLS delays in responsive static sites?

On my site Google Webmaster Tools says that a bunch of pages have CLS errors. Otherwise known as jerky loading.

On my page images are always in a div with a class that sets it to a percentage of the content block.

E.g.

<DIV class=picr>

<img src="/Images/trees/Betula/Birch_Late-Fall_Pond-edge.jpg"  alt="Birch by pond" id="birchbypond" />

<p>Birch along a pond. In the landscape birch look good in random small clumps.</p>

<hr />

</div>

I tried adding the actual dimensions of the image with width=900 height=1200. In this situation the page does scale the horizontal dimension, but not the vertical.

Google’s web dev page (https://web.dev/optimize-cls/ ) suggests putting the dimensions in. Both the text on this page, and the video seems to suggest that this would work, but it doesn’t. But this no longer leaves the page responsive. They also suggest using CSS aspect boxes. Alas, CanIUse.com says that this is not supported on ANY browser out of the box.

This article https://www.datadab.com/blog/fix-cumulative-layout-shift/ suggests the following:

img { aspect-ratio: attr(width) / attr(height);}

The W3C CSS checker responds with:

img Property aspect-ratio doesn't exist : attr(width) / attr(height)

I’m missing something here.

What is the best way to reserve space and reduce CLS on random size images on a static page?

I could settle on a small number of standard sizes. This would require that I manually resize/recrop every image I use. Then each size, or rather size ratio would have a custom css class defined. This is time consuming. (I currently have 2300 images on my site.)

design – CSS: Duplicate Styles or Keep the Same

I have following CSS below for Top and Lower button row boxes. Sometimes, I duplicate CSS , because style and design may change in future. And Two row orientations may differ.

Generally, should I a] create duplicate css styles, so future developers can customize, or b] is it best practice to tightly couple into one, until UX may change design later?

.top-button-row {
    display:flex;
    justify-content: space-between;
    align-items: center;
}

.lower-button-row {
    display:flex;
    justify-content: space-between;
    align-items: center;
}

enter image description here