The Web Design Group

... Making the Web accessible to all.

Welcome Guest ( Log In | Register )

> Responsive and adaptive design
Lee Batchelor
post Jan 12 2024, 01:12 PM
Post #21


Member
***

Group: Members
Posts: 82
Joined: 10-May 20
Member No.: 27,332



Hi all,

When I was trained in HTML and CSS, it was when desktop computers were the only platforms. Now that mobile devices are used for 51% of all web browsing, we need to use responsive and adaptive design so that the website resolves correctly on all devices. I recently completed a web design and used this code in the meta tags,
<meta name="viewport" content="width=device-width, initial-scale=1">

Sadly, this doesn't cause the website to resolve correctly on mobile devices in landscape and portrait modes. I have a feeling there's a 500 hour course of instruction in my future if I want to fix this issue. Perhaps there are some easier lines of code that will solve my problem? Thoughts?

Thanks...
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
 
Reply to this topicStart new topic
Replies
Lee Batchelor
post Jan 17 2024, 10:46 AM
Post #22


Member
***

Group: Members
Posts: 82
Joined: 10-May 20
Member No.: 27,332



Okay, I opened the new page design Coothead did for me and it looks perfect on my Android and iPad. The only issue I see is the words "The Offbeats" and our group picture are forced to the outer left and right margins respectively. How do I fix that so they reside in the middle? I don't want to ruin the code that Coothead wrote. Much appreciated!!

Note
On the current index.html page, I added a link at the bottom beside the StatCounter. It's labeled "Test". It displays Coothead's reworked page.

This post has been edited by Lee Batchelor: Jan 17 2024, 10:52 AM
User is offlinePM
Go to the top of the page
Toggle Multi-post QuotingQuote Post
coothead
post Jan 17 2024, 11:56 AM
Post #23


Advanced Member
****

Group: Members
Posts: 207
Joined: 12-January 23
From: chertsey, a small town 25 miles south west of london, england
Member No.: 28,743



QUOTE(Lee Batchelor @ Jan 17 2024, 04:46 PM) *


The only issue I see is the words "The Offbeats" and our group picture
are forced to the outer left and right margins respectively.

How do I fix that so they reside in the middle?



Replace the existing rules with these...

CODE

h1 {
   margin: 0;
   padding: 3rem 0;
   font-size: 4rem;
   font-weight: normal;
   line-height: 1.5;
   color: #f5f5f5;
   text-align:center;
   background-image: url(images/band2.png);
   background-repeat: no-repeat;
   background-size: 28rem 17.72rem;
   background-position: center 1rem;
}

@media ( max-width: 28em ) {
h1 {
   font-size: 3rem;
   background-size: 17.5rem 11.77rem;
}  
}


Also note that I resized and compressed all the images used for the page.

coothead

This post has been edited by coothead: Jan 17 2024, 12:00 PM
User is online!PM
Go to the top of the page
Toggle Multi-post QuotingQuote Post

Posts in this topic
Lee Batchelor   Responsive and adaptive design   Jan 12 2024, 01:12 PM
coothead   [indent] Thoughts? [indent] If your page appears...   Jan 12 2024, 02:42 PM
Lee Batchelor   Thanks Coothead. If I disable my entire CSS sheet,...   Jan 12 2024, 03:32 PM
coothead   [indent]Do I have this right? [indent] Not reall...   Jan 12 2024, 04:33 PM
Christian J   If I disable my entire CSS sheet, the pages will ...   Jan 12 2024, 05:27 PM
Lee Batchelor   Thanks, Coothead. I'll give that article a rea...   Jan 12 2024, 10:20 PM
Lee Batchelor   Christian, I nulled out the CSS sheet and opened t...   Jan 12 2024, 10:34 PM
Christian J   Everything displayed perfectly but the alignments...   Jan 13 2024, 07:54 PM
coothead   [indent] Thanks for the help. Further thoughts? ...   Jan 14 2024, 05:03 AM
coothead   I forgot to mention that I have used index.[b]htm...   Jan 14 2024, 11:00 AM
Christian J   The CSS looks like it can be shortened in various ...   Jan 13 2024, 08:27 PM
Lee Batchelor   Hi Coothead, Many thanks for the file. I'll c...   Jan 17 2024, 10:22 AM
Lee Batchelor   Hi Christian, Thanks for the analysis. You and Co...   Jan 17 2024, 10:31 AM
Lee Batchelor   Okay, I opened the new page design Coothead did fo...   Jan 17 2024, 10:46 AM
coothead   [indent] The only issue I see is the words ...   Jan 17 2024, 11:56 AM
Lee Batchelor   Great, thanks again Coothead. Send me your invoice...   Jan 17 2024, 01:40 PM
coothead   [indent] Great, thanks again Coothead. Send me yo...   Jan 18 2024, 06:20 PM
Lee Batchelor   OMG Coothead. What a tremendous offer. You're ...   Jan 24 2024, 04:38 PM
coothead   [indent] I usually right align the picture in the...   Jan 24 2024, 05:31 PM
Lee Batchelor   Sorry for the confusion, Coothead. When I opened y...   Jan 24 2024, 10:22 PM
Christian J   [b]Edit I selected the "notification by emai...   Jan 29 2024, 07:54 AM
Lee Batchelor   Coothead was generous enough to devote his time to...   Jan 29 2024, 03:14 PM
coothead   [indent] The only remaining issue is, the menu is...   Jan 30 2024, 05:57 PM
Lee Batchelor   Once again, many thanks Coothead!   Jan 30 2024, 07:19 PM
coothead   Hi there Lee Batchelor, after a look at your lat...   Jan 31 2024, 06:49 PM
Lee Batchelor   They look great, thanks Coothead! I just fin...   Feb 1 2024, 09:41 AM
coothead   [indent] Shall I download the HTML and CSS files ...   Feb 1 2024, 11:09 AM
Lee Batchelor   Coothead, I used the Inspection tool in Chrome and...   Feb 1 2024, 10:04 AM
coothead   [indent] I used the Inspection tool in Chrome and...   Feb 1 2024, 11:24 AM
coothead   Hi there Lee Batchelor The music.html file inclu...   Feb 1 2024, 12:23 PM
Lee Batchelor   Thanks, Coothead. That looks better. I forgot to m...   Feb 1 2024, 03:04 PM
coothead   [indent] I forgot to mention that the music page ...   Feb 1 2024, 03:56 PM
Lee Batchelor   Good catch Coothead. I ran the the pages through ...   Feb 1 2024, 04:18 PM
coothead   [indent] I ran the the pages through the W3C Val...   Feb 1 2024, 05:30 PM
Lee Batchelor   Hi Coothead, Many thanks for the validator inform...   Feb 1 2024, 07:15 PM


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

 



- Lo-Fi Version Time is now: 25th May 2024 - 04:42 PM