The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Where should I look for a code in CSS or HTML?, I am looking for the code that tells me the page width of my website,
FM formacion
post Jun 21 2023, 10:45 AM
Post #1





Group: Members
Posts: 3
Joined: 21-June 23
Member No.: 28,965



Hi there!

I am designing a website and I have a problem with the page width (in computer view). In the home page it is wider than in any other entries or pages.

Where do I look for the error, in CSS or in HTML? I have started searching but if anyone can help me I would be very grateful. smile.gif

Thanks!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
pandy
post Jun 21 2023, 12:47 PM
Post #2


🌟Computer says no🌟
********

Group: WDG Moderators
Posts: 20,733
Joined: 9-August 06
Member No.: 6



It's probably because it has three images in a row, side by side. I see no problem with this. The page adopts nicely when the browser window is resized. I'd leave it as it is. It looks good to me.
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jun 21 2023, 03:05 PM
Post #3


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



Hi!

Since this a complex Wordpress layout maybe it's best to not change anything, like pandy suggested. I've just tested the ideas below very quickly, and can't promise they won't have side-effects (or work at all)... wacko.gif

QUOTE(FM formacion @ Jun 21 2023, 05:45 PM) *

I have a problem with the page width (in computer view). In the home page it is wider than in any other entries or pages.

Do you want to make the other pages (like https://www.fabricacionmecanica.es/curso/cu...-de-mecanizado/ ) wider? Then maybe you could change the CSS width of the ARTICLE element from its current "width 65%" to the same "max-width: 1140px" that's used on https://www.fabricacionmecanica.es/ (for the DIV element with the CLASS .site-inner)? I haven't looked at any other pages than these two, though.

Or do you want to change the number of "Curso" columns on https://www.fabricacionmecanica.es/ so that each row of columns gets the same width as the other pages? Then it seems you must change the number of Curso DIVs inside their parent DIV. Currently they are grouped in three per row:

CODE
<div class="wp-block-columns are-vertically-aligned-top is-layout-flex wp-container-5">
    <div class="wp-block-column is-vertically-aligned-top is-layout-flow">...</div>
    <div class="wp-block-column is-vertically-aligned-top is-layout-flow">...</div>
    <div class="wp-block-column is-vertically-aligned-top is-layout-flow">...</div>
</div>

...maybe you could change it to two instead:

CODE
<div class="wp-block-columns are-vertically-aligned-top is-layout-flex wp-container-5">
    <div class="wp-block-column is-vertically-aligned-top is-layout-flow">...</div>
    <div class="wp-block-column is-vertically-aligned-top is-layout-flow">...</div>
</div>

<div class="wp-block-columns are-vertically-aligned-top is-layout-flex wp-container-5">
    <div class="wp-block-column is-vertically-aligned-top is-layout-flow">...</div>
    <div class="wp-block-column is-vertically-aligned-top is-layout-flow">...</div>
</div>
...

Perhaps you must then also change the CSS width of DIV.site-inner (the layout's container) from the current "max-width: 1140px" to "width: 65%".

This post has been edited by Christian J: Jun 22 2023, 04:03 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
FM formacion
post Jul 3 2023, 09:15 AM
Post #4





Group: Members
Posts: 3
Joined: 21-June 23
Member No.: 28,965



QUOTE(pandy @ Jun 21 2023, 07:47 PM) *

It's probably because it has three images in a row, side by side. I see no problem with this. The page adopts nicely when the browser window is resized. I'd leave it as it is. It looks good to me.


Thanks for looking at it Pandy! I appreciate your comment. I think I will try what Christian J. suggest. smile.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
FM formacion
post Jul 3 2023, 09:47 AM
Post #5





Group: Members
Posts: 3
Joined: 21-June 23
Member No.: 28,965



QUOTE(Christian J @ Jun 21 2023, 10:05 PM) *

Hi!

Since this a complex Wordpress layout maybe it's best to not change anything, like pandy suggested. I've just tested the ideas below very quickly, and can't promise they won't have side-effects (or work at all)... wacko.gif

QUOTE(FM formacion @ Jun 21 2023, 05:45 PM) *

I have a problem with the page width (in computer view). In the home page it is wider than in any other entries or pages.

Do you want to make the other pages (like https://www.fabricacionmecanica.es/curso/cu...-de-mecanizado/ ) wider? Then maybe you could change the CSS width of the ARTICLE element from its current "width 65%" to the same "max-width: 1140px" that's used on https://www.fabricacionmecanica.es/ (for the DIV element with the CLASS .site-inner)? I haven't looked at any other pages than these two, though.

Or do you want to change the number of "Curso" columns on https://www.fabricacionmecanica.es/ so that each row of columns gets the same width as the other pages? Then it seems you must change the number of Curso DIVs inside their parent DIV. Currently they are grouped in three per row:

CODE
<div class="wp-block-columns are-vertically-aligned-top is-layout-flex wp-container-5">
    <div class="wp-block-column is-vertically-aligned-top is-layout-flow">...</div>
    <div class="wp-block-column is-vertically-aligned-top is-layout-flow">...</div>
    <div class="wp-block-column is-vertically-aligned-top is-layout-flow">...</div>
</div>

...maybe you could change it to two instead:

CODE
<div class="wp-block-columns are-vertically-aligned-top is-layout-flex wp-container-5">
    <div class="wp-block-column is-vertically-aligned-top is-layout-flow">...</div>
    <div class="wp-block-column is-vertically-aligned-top is-layout-flow">...</div>
</div>

<div class="wp-block-columns are-vertically-aligned-top is-layout-flex wp-container-5">
    <div class="wp-block-column is-vertically-aligned-top is-layout-flow">...</div>
    <div class="wp-block-column is-vertically-aligned-top is-layout-flow">...</div>
</div>
...

Perhaps you must then also change the CSS width of DIV.site-inner (the layout's container) from the current "max-width: 1140px" to "width: 65%".


Thank you Christian J!

That's exactly what I wanted. Now all the page and post widths are the same as the home page. Thank you!
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
Christian J
post Jul 3 2023, 10:54 AM
Post #6


.
********

Group: WDG Moderators
Posts: 9,661
Joined: 10-August 06
Member No.: 7



You're welcome! smile.gif
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Reply to this topicStart new topic
4 User(s) are reading this topic (4 Guests and 0 Anonymous Users)
0 Members:

 



- Lo-Fi Version Time is now: 27th April 2024 - 10:47 AM