❓ Help Website making Using HTML

GreAtSage05

Established
I have problem regarding dito, okay naman sya sa laptop pero pag sa mobile or pag-half lang ay ganito.
I'm using html at sa visual studio 2022 ko ginawa, hindi na ako gumamit ng css dahil nasa <style> na.

Any tips?
View attachment 3322533
Screenshot_20241214-224026.webp
Screenshot_20241214-224042.webp
 
Hello GreAtSage05!

It seems like you're encountering issues with your HTML page's responsiveness, especially when viewed on mobile devices or when the browser window is resized. This is a common challenge when web pages are designed primarily on a desktop view without considering smaller screens.

Since you're writing your styles directly within the <style> tag in your HTML and not using an external CSS file, you'll need to ensure that your styles are responsive. Here are some tips and techniques to help you make your HTML page mobile-friendly:

1. Use Viewport Meta Tag: First, make sure you have the viewport meta tag in the <head> section of your HTML. This tag helps control the layout on mobile browsers. Without it, mobile devices might render the page at a typical desktop screen width.

Code:
html
   <meta name="viewport" content="width=device-width, initial-scale=1">

2. Media Queries: These are incredibly useful for making your design responsive. You can add different styles for different screen sizes. For example:

Code:
html
   <style>
     body {
       background-color: lightblue;
     }

     /* Smaller screens */
     @media (max-width: 600px) {
       body {
         background-color: violet;
       }
     }
   </style>

In this example, the background color changes when the screen width is 600px or less.

3. Flexible Layouts: Use percentages for widths instead of fixed pixel values where possible. This makes elements scale relative to their container.

Code:
html
   <style>
     .container {
       width: 100%;
       padding: 20px;
     }
     .column {
       float: left;
       width: 50%;
     }

     @media (max-width: 600px) {
       .column {
         width: 100%;
       }
     }
   </style>

4. Font Sizes and Button Sizes: Ensure that text and interactive elements like buttons are large enough to be easily readable and clickable on mobile devices.

5. Testing: Regularly test your webpage on various devices and screen sizes to ensure it looks good and functions well. You can use the Chrome Developer Tools (right-click on the page, select "Inspect" and then toggle the device toolbar) to simulate different screens.

6. Frameworks: If you find it challenging to handle responsiveness with plain HTML and CSS, consider using a CSS framework like Bootstrap. It comes with built-in classes that are responsive and can significantly simplify your styling work.

Applying these strategies should help improve the responsiveness of your webpage. If you have specific elements or layouts that are causing issues, feel free to share the code, and I can provide more targeted advice. Happy coding!
 
try learning yung media query ata paps for responsiveness not sure lang if yan yung solution sa mga bossing na batak dyan hehe help kanila, nag aaral palang din ako e
 

About this Thread

  • 5
    Replies
  • 495
    Views
  • 5
    Participants
Last reply from:
getRONed

Trending Topics

Online now

Members online
1,060
Guests online
1,662
Total visitors
2,722

Forum statistics

Threads
2,268,866
Posts
28,924,560
Members
1,243,092
Latest member
Brtbrtpatapim
Back
Top