|
Gypsy Boy
Redeemer



Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 3 months, 12 days
|
Please help me with my website
#26649823 - 05/05/20 05:53 AM (3 years, 9 months ago) |
|
|
Making a website in Dreamweaver.
Everything's great except ONE thing
My picture and slogan doesn't appear centred ON MY SAMSUNG S8+ MOBILE device.
It looks just right in Google Chrome, internet explorer AND even on my apple IPad. But for some reason picture appears to the left on my android galaxy S8+
This is doing my head in. I gotta figure out how to fix this. A lot of people use androids 
Heres a quick code :
Quote:
<html lang="en-US"> <head> <meta charset="utf-8"> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1"> <title>Finder</title> <link href="singlePageTemplate.css" rel="stylesheet" type="text/css"> <style type="text/css"> body { background-color: #DAE9FB; text-align: center; } </style> </head> <body>
<p> </p> <p> <img src="image.png" alt="" width="537" height="295"></p> <p> </p> <p style="font-size: 18px; text-align: center;">Welcome to my website.</p>
--------------------
|
Moldman
Stranger


Registered: 03/21/20
Posts: 26
Loc: Contamination
Last seen: 3 years, 12 days
|
Re: Please help me with my website [Re: Gypsy Boy]
#26650088 - 05/05/20 08:33 AM (3 years, 9 months ago) |
|
|
Not expert on matter but do you do your testing with Chrome developer tools or like so you can test how webpage looks with click of a button in different resolutions in different devices? Might need to add a custom device with right resolution. If you test with phone instead of Chrome on computer, have you tried different browser in it if that behaves differently? If not, try installing Chrome. Asking this because whatever builtin browser I had in my phone or tablet most sites I visited didn't render properly.
|
Gypsy Boy
Redeemer



Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 3 months, 12 days
|
Re: Please help me with my website [Re: Moldman]
#26650469 - 05/05/20 11:35 AM (3 years, 9 months ago) |
|
|
I'll figure it out, might go on samsung/android forums...
Just thought someone here might help
--------------------
|
koraks
Registered: 06/02/03
Posts: 26,689
|
Re: Please help me with my website [Re: Gypsy Boy]
#26651916 - 05/05/20 11:56 PM (3 years, 9 months ago) |
|
|
You have no "center" tag or style element for the title, so it will be displayed according to the default of the browser.
|
Gypsy Boy
Redeemer



Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 3 months, 12 days
|
Re: Please help me with my website [Re: koraks]
#26652359 - 05/06/20 07:07 AM (3 years, 9 months ago) |
|
|
Quote:
body { background-color: #DAE9FB; text-align: center; } /quote]
What's that supposed to be?
Like I said it is centred on pc and ipad, it's just my galaxy smartphone
--------------------
|
Ythan
ᕕ( ᐛ )ᕗ


Registered: 08/08/97
Posts: 18,783
Loc: NY/MA/VT Borderlands
Last seen: 41 minutes, 24 seconds
|
Re: Please help me with my website [Re: Gypsy Boy]
#26652686 - 05/06/20 10:38 AM (3 years, 9 months ago) |
|
|
I tested your code in Samsung Browser 11.1.2.2 and the image was centered for me. Are you sure you're zoomed out all the way?

You could try adding something like this to your style but it shouldn't be necessary:
Code:
img { display: block; margin-left: auto; margin-right: auto; }
|
Gypsy Boy
Redeemer



Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 3 months, 12 days
|
Re: Please help me with my website [Re: koraks]
#26653021 - 05/06/20 02:03 PM (3 years, 9 months ago) |
|
|
Quote:
koraks said: You have no "center" tag or style element for the title, so it will be displayed according to the default of the browser.
Apart from default declaration i posted above theres also this:
Quote:
<p style="font-size: 18px; text-align: center ;">Welcome to my website.</p>
--------------------
|
Gypsy Boy
Redeemer



Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 3 months, 12 days
|
Re: Please help me with my website [Re: Gypsy Boy]
#26653029 - 05/06/20 02:07 PM (3 years, 9 months ago) |
|
|
Ythan, thanks for stopping by.
I have no clue why my samsung gone rogue on my website.
It would be good to simply post address of my website but i dont want to reveal its content just yet.
I will figure it out one way or the other.
Ohh and this: i started working on my website a months ago. Where on the net should i go for help? Doing everything on your own sucks, in uni id ask tutor and he would solve my problem in 20 seconds, here sometimes i m stuck on a problem sometimes for hours. I guess i could ask for help here... or maybe reddit?
I am glad i got Dreamweaver 2020 CC. Expensive but very practical when coding HTML & CSS. Anyway i am almost done with HTML /Css side of my website, now its to do some heave PHP and MySQL coding.
Will take me couple of months to finish this. Its a cool site, i think u gonna like it
--------------------
Edited by Gypsy Boy (05/06/20 02:25 PM)
|
Ythan
ᕕ( ᐛ )ᕗ


Registered: 08/08/97
Posts: 18,783
Loc: NY/MA/VT Borderlands
Last seen: 41 minutes, 24 seconds
|
Re: Please help me with my website [Re: Gypsy Boy]
#26653225 - 05/06/20 04:07 PM (3 years, 9 months ago) |
|
|
Man that's a good question. These days I don't get stuck on actual HTML very often so I'm usually looking for help with backend stuff. Mostly I just use Google and Stackoverflow. I still haven't come across a problem that isn't already explained somewhere online so improving my Google-fu has probably helped me the most over the years.
But out of all the old forums I have in my bookmarks, it looks like https://forums.digitalpoint.com/ is still alive and kicking, I bet you can get good answers there.
Good luck, I'll be interested to see your site!
|
Gypsy Boy
Redeemer



Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 3 months, 12 days
|
Re: Please help me with my website [Re: Ythan]
#26653366 - 05/06/20 05:27 PM (3 years, 9 months ago) |
|
|
Just spent 3 hours heavy coding.
I now can not only print shit from a database but upload "text area" into a database.
My website is pretty simple. Its like a message board but very simplified and without the baggage. (im doing it from scratch btw, not using any packaged message boards)
Today i managed to work out how to gather user submitted data, tomorrow im going to learn how to print it on a page, and the next day how to search / skim thro all bullitens. And im done, alpha phase is over.
--------------------
|
Ythan
ᕕ( ᐛ )ᕗ


Registered: 08/08/97
Posts: 18,783
Loc: NY/MA/VT Borderlands
Last seen: 41 minutes, 24 seconds
|
Re: Please help me with my website [Re: Gypsy Boy]
#26653477 - 05/06/20 06:18 PM (3 years, 9 months ago) |
|
|
Sounds awesome man, it's so gratifying when your first project starts to come together. 
Make sure you read up about HTML and SQL injection attacks before going live with any site that displays or saves user input. It's easy to build an insecure script by accident when you're first getting started but it's also easy to avoid these vulnerabilities once you're aware of them.
|
Gypsy Boy
Redeemer



Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 3 months, 12 days
|
Re: Please help me with my website [Re: Ythan]
#26654446 - 05/07/20 05:53 AM (3 years, 9 months ago) |
|
|
God damn it!! made a neat and tidy site i n Dreamweaver...
Load it up in chrome or explorer , its looks messy
--------------------
|
Gypsy Boy
Redeemer



Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 3 months, 12 days
|
Re: Please help me with my website [Re: Gypsy Boy]
#26654507 - 05/07/20 06:50 AM (3 years, 9 months ago) |
|
|
Good God!!!
It looked like shit in WAMP but when i uploaded onto my website it looks just right!!!
--------------------
Edited by Gypsy Boy (05/07/20 08:14 AM)
|
Gypsy Boy
Redeemer



Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 3 months, 12 days
|
Re: Please help me with my website [Re: Gypsy Boy]
#26654748 - 05/07/20 09:43 AM (3 years, 9 months ago) |
|
|
Right Ythan, hold on to yer hat 
I am making progress.
In my web app i have 3 options to
1. Advertise / gather user data
2. Browse said data
3. Search for specific data
I have completed first bit very well. Im on my second bit.
I need to know how to format text stored on MySQL into a nice paragraph chunks. I have no idea just yet.

Here is a sample of code i need to fit into 2nd phase. Can you please help me out bud? It will come in text boxes. One goes under the last one. thats it. Nothing fancy
ps. u gotta love Dreamweaver coloration of the code 
All i want is to be able to manipulate data like php text same way you would go about changing html
--------------------
|
stubb
Dahg Rastubfari



Registered: 03/23/19
Posts: 1,322
Loc: Memory
|
Re: Please help me with my website [Re: Gypsy Boy]
#26655378 - 05/07/20 03:21 PM (3 years, 9 months ago) |
|
|
Quote:
Gypsy Boy said: I need to know how to format text stored on MySQL into a nice paragraph chunks.
Don't mean to butt in, but you don't need to do much. If you insert data from a <textarea> into a database, the line formatting will be preserved. In the database it'll look something like "Line one\r\nLine Two\r\n\r\nLine Four". '\r' and '\n' are special characters (ASCII Control Characters) that tell a computer to return the cursor to far left and move it down to a new line.
If you put this data back into a textarea from the database, it will look as it should. In most any other element though, the line formatting won't show (rather, the control codes will print line breaks in the HTML source, which the browser engine ignores). For this php has the nl2br() method, which will convert ASCII \newlines to HTML <br>eaks. Or, HTML has the <pre> tag which will preserve plain-text pre-formatting - whitespace as well as linebreaks.
I'm going to echo Ythan though because it's extremely important you do your homework on injection attacks before going live. A friend of mine once asked me to help attempt some damage control after ending up with a reverse shell on his server via injection - it was an absolute dumpster fire.
--------------------

|
Gypsy Boy
Redeemer



Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 3 months, 12 days
|
Re: Please help me with my website [Re: stubb]
#26655403 - 05/07/20 03:36 PM (3 years, 9 months ago) |
|
|
OK. This is a problem i cannot solve myself.
I cant copy paste code in here for some reason so im attaching a SMALL pic with the code here.
Please help me guys
--------------------
|
Gypsy Boy
Redeemer



Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 3 months, 12 days
|
Re: Please help me with my website [Re: Gypsy Boy]
#26655409 - 05/07/20 03:38 PM (3 years, 9 months ago) |
|
|
Quote:
If you put this data back into a textarea from the database
THATS is what im trying to do. So far i can only output default/standard text on a white screen!! I need to make it look good - like in a colored text box/area!!
--------------------
|
stubb
Dahg Rastubfari



Registered: 03/23/19
Posts: 1,322
Loc: Memory
|
Re: Please help me with my website [Re: Gypsy Boy]
#26655422 - 05/07/20 03:44 PM (3 years, 9 months ago) |
|
|
<textarea> needs to be echoed as string, and <br>'s within the textarea need to be newlines:
while ($resultarr = mysqli_fetch_assoc($result)){ $r1 = $resultarr["message"]; echo "<textarea>" echo $r1, " "; echo "\r\n"; echo "\r\n"; echo "</textarea>"; }
--------------------

|
Gypsy Boy
Redeemer



Registered: 03/17/17
Posts: 4,501
Loc: Deep in the discoteka
Last seen: 3 months, 12 days
|
Re: Please help me with my website [Re: stubb]
#26655451 - 05/07/20 03:58 PM (3 years, 9 months ago) |
|
|
Tried that got :
Quote:
Parse error: syntax error, unexpected 'echo' (T_ECHO), expecting ',' or ';' in C:\wamp64\www\sandbox\html.php on line 27

I have NO idea why it doesnt like line 27
--------------------
|
stubb
Dahg Rastubfari



Registered: 03/23/19
Posts: 1,322
Loc: Memory
|
Re: Please help me with my website [Re: Gypsy Boy]
#26655460 - 05/07/20 04:02 PM (3 years, 9 months ago) |
|
|
Indeed, I missed the ; after 'echo "<textarea>"'
fixed:
while ($resultarr = mysqli_fetch_assoc($result)){ $r1 = $resultarr["message"]; echo "<textarea>"; echo $r1, " "; echo "\r\n"; echo "\r\n"; echo "</textarea>"; }
--------------------

|
|