Questions tagged [css]
CSS, short for Cascading Style Sheets, is a language used to control the presentation (including colors, layout, and fonts) of HTML and XHTML documents.
702
questions
1
vote
1
answer
29
views
Why would h2 be a class in an h1 tag?
Today, I ran across a tag, in the site of some acquaintances, that seems to have a structural flaw. But, I thought I would check whether my impression is on track before I mention it to them.
In what ...
0
votes
0
answers
5
views
Blocking fallback form when javascript is enabled [migrated]
I'm trying to setup a page where people can submit data in a form, but the presentation of the form is based on whether the user has javascript and/or CSS enabled or not.
Currently I have a code ...
12
votes
3
answers
4k
views
Why do oversized images appear better than images that are the correct size on the web?
I've noticed that when I use large images, and use CSS to show them at small sizes, they look much better quality than images that are the correct size. Why is this the case?
Is CSS loading the full ...
0
votes
0
answers
12
views
My navigation links are not aligning properly on the right [migrated]
I currently have a site where my navigation links are aligned to the right. I made some changes to one of the navigation links so that when you hover over it, additional nav links pop up. However, I'...
2
votes
0
answers
25
views
CSS Flex Order, What Does Googe Use?
If I have a page with four rows of content in the HTML ordered as:
Topic C
Topic A
Topic B
Topic D
Then using CSS I reorder them into ABCD for desktop and DABC for mobile, which row will Google use ...
0
votes
0
answers
37
views
Trying to learn JSON after a little CSS and HTML
I'm learning to place media queries into a website for getting the correct layout changes I need on different mobile devices. I've done this in CSS and Bootstrap before, but my job is asking me to do ...
0
votes
1
answer
24
views
CSS direction property, actual page language and SEO
I have a menu with a vertical scrollbar in my HTML pages.
This menu is on the left side of the HTML pages.
In order to have the scrollbar on the left side of the menu, I used a trick I found on the ...
0
votes
0
answers
16
views
Table of contents in compliance with usability.gov 7.3
I'm trying to make the long pages on my site comply with usability.gov section 7:3 which is described here:
https://www.powermapper.com/products/sortsite/rules/usegov7.3/
So I went ahead and started ...
0
votes
1
answer
22
views
Custom "cookie solution" [closed]
I'm working on a website for a client who owns a restaurant.
I've just finished developing it and I'm working on the part relating to the privacy policy and related cookies.
The cookies used by the ...
0
votes
0
answers
14
views
How can I set up a site-wide default setting opens any .pdf file in a new window?
I'm currently using Squarespace to build my website. I'm looking to implement a function where any time a visitor encounters a hyperlink .pdf file, it automatically opens in a new window. While I ...
0
votes
1
answer
190
views
Why does font-family=monospace not render the text with a non-proportinal font?
When I open the following HTML document in Chrome …
<html>
<head>
<style>
p { font-family: monospace }
</style>
</head>
<body>
<p>mmmmmmm</p>
&...
0
votes
2
answers
26
views
Why is margin box said to be box around all other boxes? [closed]
One thing i cant understand when it comes to elements boxes is the margin box.
For example mdn web docks defines it as follow :
"Margin box: The margin is the outermost layer, wrapping the ...
0
votes
0
answers
33
views
Will using this CSS solution for Facebook Page Follow plugin violate search engine guidelines?
I encountered a problem with the Facebook Page Follow plugin on my website where the plugin would disappear when I rotated my device (changing orientation), despite initially appearing correctly. To ...
1
vote
0
answers
20
views
Can I style <dt> directly within the tags?
I've inherited a project that contains a small web UI, which is a completely foreign land for me.
Elements are displayed using the <dt> and <dd> tags that are styled using a CSS.
However, ...
3
votes
2
answers
101
views
Does it cause any SEO issues for my <h1> tag to come after my <h2> tag in the HTML?
I have a <div> with an <h1> tag that I moved to the top of the page using CSS, but in the code, the <h2> tag comes before the <h1> tag. Is Google Crawler smart enough to read ...
2
votes
2
answers
365
views
How to Give Credit for Background Images
I'm using a background image (creative commons attribution license) on one of my pages. There was no direction on how to attribute the image. I want to give credit to the source, but since this is a (...
4
votes
2
answers
106
views
List of SEO rules for HTML tags?
I know there are some rules related to specific attributes that some tags should have. For example, input, select and textareas should have aria-label on them. I'd like to have a full list of these ...
1
vote
0
answers
17
views
Display data on Html page [closed]
I have a website that displays data from external files. But there is a problem with the display as in the attachment. How can I control the page size to display the full data without compression ??
2
votes
1
answer
49
views
How much impact do CSS pseudo elements as overlays that cover the whole page on page load have on SEO?
I have created a page transition where on page load for the fraction of a second a whole page is covered with a CSS pseudo element, which then transitions to go into the background.
Do search engines ...
1
vote
0
answers
30
views
When doing URL forwarding from my custom domain from registrar to GitHub, mobile view doesn't work and gives tablet view instead
I have a website set up so that my custom domain forwards to my GitHub pages website. I set this so that it's easier to host static websites.
When I view my website through custom domain on mobile ...
2
votes
1
answer
62
views
Getting rid of top and bottom border tails
Look at the image... and now could anyone tell me how to get rid of the top and bottom "tails" to the borderline (which are there because the line-height is set to 40px).
The source code is ...
3
votes
1
answer
1k
views
Add css-class to href-link according to the target URL
Imagine you put a link in your WordPress post, for example to https://green.example. You also set a link to https://red.example and to https://yellow.example. I would like to make it such that ...
5
votes
5
answers
2k
views
How can I upload my files to a domain that I bought?
I secured domain on register.ca, and I have it in my account. How would I go about actually uploading my HTML & CSS files onto the website? Previously, I just used GitHub to host my sites, so I'm ...
1
vote
0
answers
18
views
font-css display problem same code on one domain works, on the other it doesn't [closed]
font-css display problem
same code on one domain works, on the other it doesn't.
Font Family: 'JOST'
old site run www.link-motors.it
new site not run www.linkmotors.it
who can help me understand? the ...
0
votes
0
answers
14
views
.htaccess File Causing Page Not To Load Properly [duplicate]
I'm using a .htaccess file to get rid of the ".html" at the end of each URL on my website. This file works well at getting rid of the extension on all my pages except for one which displays ...
1
vote
2
answers
101
views
Removing .html Extension On URL Inside Of An MAMP Server [closed]
Below is the code that I'm using on a .htaccess page in order to get rid of the ".html" at the end of the URL. It works fine on all pages except for one. Would any of the code on that one ...
1
vote
0
answers
18
views
Website not showing in search results when searching with spaces [duplicate]
Website not showing in search results when searching with spaces
Example: mywebsite.com
(Without spaces) When i search "mywebsite" it shows #1
(With spaces) When i search "my website&...
2
votes
1
answer
414
views
Changing HTML and CSS files don't show the change on the Apache virtual host?
I've been working on a website and I'm testing it on a virtual server hosted by my desktop.
Whenever I change something on the HTML or CSS file I'm in, it shows the change I did on the LiveServer (the ...
1
vote
1
answer
56
views
Locally Hosted Graphic User HTML Editor for Web Developing [closed]
I'm currently developing a new website for a small business, but I'm the only one that can edit via HTML/CSS/JS files.
My boss doesn't want to rely on CMS for some reason, but wants some sort of GUI ...
2
votes
1
answer
211
views
Does Google index text from CSS and HTML files?
Our website's template is for a job directory site, but it was repurposed for a school directory. The CSS, HTML, and PHP strings still show Company in the code, but the company name can't be seen on ...
4
votes
1
answer
42
views
Google Mobile Friendly Tester Issue - Preview Shown Is Very Small
The mobile friendliness tester is saying that my text is too small, and that clickable elements are too close together. I ensured that ALL text on the page was above 18 font to test, and Google still ...
2
votes
2
answers
103
views
SEO-friendly duplicated (decorative) text
is there any "SEO-friendly" way to show a page title like below?
It's easy to implement with an HTML code like this:
<h2>Sample Title</h2>
<span class="shadow">...
1
vote
1
answer
59
views
Why can I use Google web fonts in CSS without an Internet connection or them being installed locally on my computer?
I used a Google font for my website, which isn't stored locally on my computer. When I refresh the page, nothing goes wrong and the font is working fine. However, when I disconnect my Internet ...
2
votes
1
answer
45
views
What is this symbol (appears before line break)?
On Pixel 6 (Android) using the Chrome browser, there's this strange symbol I've never seen before that usually appears before some of the line breaks on my website. Does anyone have any idea what this ...
1
vote
1
answer
367
views
Does onclick animation affect SEO?
We want to build the website with mind-blowing animations, but SEO is also important for us and I am wondering about the SEO effects in the case of CSS and JS animations.
Let's say we want to build ...
3
votes
1
answer
521
views
Is Largest Contentful Paint (LCP) measured only above the fold?
A lot of sources mention that LCP is measured only above the fold, and stops measurements after a user action like scroll or key press. Though, I am able to get LCP for an image which is lazy-loaded ...
1
vote
1
answer
336
views
Core Web Vitals - Field data difference Mobile vs Desktop
I am observing a strange problem related to Core Web Vitals, I have same website for both mobile and desktop(same server/same page/same DOM size) but I when I look into search console I get different ...
4
votes
1
answer
408
views
Core web vitals - LCP is being recounted on element outside viewport
I have been trying to control LCP on my website but unfortunately a strange phenomenon is continuously occurring, An element which is not in viewport is considered to be an LCP.
Opposite to that ...
4
votes
1
answer
572
views
Responsive Websites <meta name="viewport" content="width=device-width, initial-scale=1">
Everywhere I look (e.g. Web.dev), it tells you that you must use <meta name="viewport" content="width=device-width, initial-scale=1"> in the header of your HTML file, so ...
2
votes
1
answer
352
views
How JSON works in HTML Script Tag regarding SEO Search availability?
I know this topic already all over the forum. But still, I'm confused if there is no exact example of what they mean with dynamic render using Javascript.
so here is the background of my question:
I ...
3
votes
2
answers
270
views
Display SEO-friendly musical chords above text in HTML
I'm currently rendering guitar chords above lyrics on my website like this:
span.chunk {
position:relative;
top: 15px;
display: inline-flex;
flex-direction: column;
vertical-...
2
votes
1
answer
97
views
Should I use CSS to hide a duplicative menu or does it need to be removed from the page source for SEO?
The only thing I have in my sidebar menu is a navigation menu and the only thing that makes that navigation menu unique is a link to my contact form instead.
I think to remove the burger-sidebar (...
1
vote
3
answers
76
views
Is SEO affected by CSS or JS that hides content after a few seconds after the page loads?
I was instructed to implement a "filter" in some pages on a corporate website, the filter hides the page content and ask for a valid email to continue reading. Sort of an opt-in but forced, ...
2
votes
3
answers
2k
views
SEO (speed): SVG vs background-image vs image tag
I know this has been asked multiple times, but I really could not find an answer.
I have a relatively small logo (icon) and I need to load it multiple times on specific places. I was wondering: should ...
2
votes
1
answer
95
views
Does Lighthouse sometimes miss preload links if non-preload link is also present?
I added preload links to my site for two CSS files, and this was by far the biggest improvement opportunity listed in the Lighthouse audit.
I added the preload links, and ran a new Lighthouse audit, ...
3
votes
2
answers
113
views
Can you force text to not display if font is not loaded?
I am using a custom font to display some text at the beginning of my blog post. What I desire, is for the text to display only if the font has been installed by the user. Here is my first attempt:
<...
3
votes
1
answer
11k
views
Tailwind CSS text and image on same line?
Using Tailwind CSS
<!doctype html>
<html>
<head>
<meta charset="UTF-8" />
<link href="tailwind.css" rel="stylesheet">
</head>
<...
4
votes
3
answers
235
views
How to deal with minification
Sorry for such a noob question, I just started learning web development. But I am confuse on how do you handle minification on JS and CSS.
For example you minify your JS, CSS files for release but ...
1
vote
1
answer
526
views
How do you use preload links for CSS containing only @font-face?
I'm declaring preload links for a CSS file containg ONLY @font-face rules.
Should I add <link rel="preload" href="styles.css" as="style"> as="style" or &...
3
votes
1
answer
48
views
Accessibilitywise, how long should submit buttons in forms be?
Accessibilitywise, how long should submit buttons in forms be?
Is there a worldly accessibility standard for minimal height (as with min-height or font-size+padding CSS directives) for submit buttons ...