Welcome, Guest: Register On Nairaland / LOGIN! / Trending / Recent / New
Stats: 3,150,038 members, 7,807,121 topics. Date: Wednesday, 24 April 2024 at 09:51 AM

Please Web Masters I Need Your Help With This Coding Problem - Webmasters - Nairaland

Nairaland Forum / Science/Technology / Webmasters / Please Web Masters I Need Your Help With This Coding Problem (642 Views)

Please Web Developer And Front End Developer Please How Do You Code This / Web Masters! Which Wordpress Theme Is Best For An Entertainment Website? / Web Masters Help Me Review My Blog (2) (3) (4)

(1) (Reply) (Go Down)

Please Web Masters I Need Your Help With This Coding Problem by Stephenben(m): 3:20am On Sep 05, 2017
Please guys I need your help.. I'm a beginner to web designing and I just started learning CSS but I'm having a problem seting up my button.. Wen I gave my button a class, I named it..
<div class="button">
<input type="button" name="submit" value="submit">
</div>

Then I went over to my CSS external file to edit the button class.. Lyk dis....

.button{background-color:red; color:white; padding:20px; border: 2px blue solid;}..

After I do this, the submit button would pop out but it would have another box behind it.. The button would show but another submit button that is as long as the computer screen would be behind the submit button.. Please can someone help if I made a mistake somewhere in my HTML or CSS code..

And I also have a problem with uploading a picture to my web page.. I saw on nairaland that even though your computer system is not connected to the internet, you can still upload a picture to your page.. I followed the steps by copying the image URL from my laptop through "Properties" and then I embedded it into my <img> tag.. And I added ///file. Etc to the URL but it still didn't show.. <img src="file url"></img>


Please no insults.. Please I'm just a beginner
Re: Please Web Masters I Need Your Help With This Coding Problem by Donald3d(m): 6:01am On Sep 05, 2017
So many things could cause the button issue .
Is there any other css file or are you using any framework eg bootstrap ??
i would also advice you use another name for that button class (eg my_button or red_button)

As for the image problem.When you are referencing the image in your html,it should be relative to the location of that same html file
If your html file and the image are in the same folder ,use this :
<img src="imagename.jpg" />

"imagename.jpg" can be anything ,also make sure the image name doesnt have space in it and you are adding the right extension for example .jpg or.png

Let me know if you are still having any issue
Re: Please Web Masters I Need Your Help With This Coding Problem by Dmayor7(m): 8:52am On Sep 05, 2017
Try changing the class name you have the button.

It might be that another css is freaking it up.

Coming to your images..

Always have your images in a folder in the same folder where your web pages is

E.g....

My site folder

Index.html
My style.css
Images (Logo.png, Slider.jpg, Bg.jpg)


Then when you are to reference it in your css you can do this.....

/images/logo.png

/images/slider.jpg

Hope it helps you?....
Re: Please Web Masters I Need Your Help With This Coding Problem by Stephenben(m): 9:49am On Sep 05, 2017
Donald3d:
So many things could cause the button issue .
Is there any other css file or are you using any framework eg bootstrap ??
i would also advice you use another name for that button class (eg my_button or red_button)

As for the image problem.When you are referencing the image in your html,it should be relative to the location of that same html file

<img src="imagename.jpg" />



Let me know if you are still having any issue

I'm not using any framework... Its total do it yourself with notepad.. The IMG is still not working.. I have placed the image into my CSS folder and also placed my HTML file all inside a folder called CSS.. So wat i have dere is csscheatsheet>>CSS>> then my HTML and CSS file and my images
Re: Please Web Masters I Need Your Help With This Coding Problem by DualCore1: 4:26pm On Sep 05, 2017
Apply the class to the input tag not the holding div tag

So this,
<div class="button">
<input type="button" name="submit" value="submit">
</div>

Should be,
<div>
<input type="button" name="submit" value="submit" class="button">
</div>


Because you applied the class to the div tag, the effect of the class is seen on the div tag. It is taking up the entire space because that's what divs do, they take up the entire space that they can possibly take. To control the width of a div tag, use the "width" CSS property.

Full working code

<style>.button{background-color:red; color:white; padding:20px; border: 2px blue solid;}</style>
<div class="">
<input type="button" name="submit" value="submit" class="button">
</div>



Regarding your issue of using pictures on your website. Do some google search on the HTML <img> and absolute and relative file paths.

I recommend w3schools.com for the basics
Also look at tutorialspoint.com
When you're done tumbling raw CSS and are grounded in it, Bootstrap is the way forward.

1 Like

Re: Please Web Masters I Need Your Help With This Coding Problem by dogstyle007(m): 4:46pm On Sep 05, 2017
Also try clearing your browser cache it's very important in cases like this...

1 Like

Re: Please Web Masters I Need Your Help With This Coding Problem by Stephenben(m): 8:57pm On Sep 10, 2017
There was a time when it worked.. And the images appeared but I wanted to know how to do it myself.. Then I deleted that particular html file.. But when I tried doing it again, I couldn't do it.. It started showing me a torn paper

(1) (Reply)

Save Thousands Of Hours When Creating Background Images For Your Websites / Web Editor Needed For My Blog / Google Adsense UK/USA/NAIJA (ADDRESS & TAX VERIFICATION SERVICES) AVAILABLE

(Go Up)

Sections: politics (1) business autos (1) jobs (1) career education (1) romance computers phones travel sports fashion health
religion celebs tv-movies music-radio literature webmasters programming techmarket

Links: (1) (2) (3) (4) (5) (6) (7) (8) (9) (10)

Nairaland - Copyright © 2005 - 2024 Oluwaseun Osewa. All rights reserved. See How To Advertise. 21
Disclaimer: Every Nairaland member is solely responsible for anything that he/she posts or uploads on Nairaland.