Jump to content

Search the Community

Showing results for tags 'margin'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 20 results

  1. I have spent many hours (over many days) trying to find out how to align a <script></script> within HTML5 specifically one that creates a canvas using . There is a page referring to centering images... https://www.w3schools.com/howto/howto_css_image_center.asp useless! There is a page referring to CSS Layout.... https://www.w3schools.com/css/css_align.asp useless! And heres another one on Canvas reference.... https://www.w3schools.com/tags/ref_canvas.asp useless! https://www.w3schools.com/tags/tag_canvas.asp useless! https://www.w3school
  2. I am trying to have my background in my division take up it's full height but it is only taking up the height of the header. I've tried setting the height but it doesn't budge. It will only fill as much content as I have in the section, the problem is I only want the one header and that's all. I am simply trying to recreate a webpage that I made on weebly with for my class in html but I am really stuck on this. I will post the code below and a screen shot. <!DOCTYPE html> <html> <head> <style> .first { background-image: url('trampoline.jpg');
  3. Please try this code. <!DOCTYPE html> <html> <head> <style> div { background-color: lightgrey; width: 50px; border: 25px solid green; padding: 10px; margin-right: 10px; margin-left: 10px; margin-top: 10px; margin-bottom: 10px; } </style> </head> <body> <h2>Testing Margins</h2> <div style="display:inline-block;">Box 1</div> <div style="display:inline-block;">Box 2</div> <br /> <div style="display:inline-block;">Box 3</div> <div style="display:inline-block;"&
  4. HTML CODE:- <body> <main> <article> <header> <h1>Azure Kingfisher</h1> </header><hr> <p>This stunning little kingfisher is common on waterways across the <a title="Top End Australia Video"; href=" " target="_blank">Top End</a>, but can be difficult to see well. this is some text about the kingfisher this is some text about the kingfisher.this is some text about the kingfisher. this is some text about the kingfisher.sdnf iuhrwei hear hoheo eogflkvoiejar glk oisdfj w oaif iasdfi asoif asidfjsaifdj osaijdfiasdf insadfoi</p
  5. WesleyA

    margin-top and div

    I have a question about margin-top. I made a css script with span columns. The higher columns are supposed to push the lower ones down. I place them in a div, in here multiple columns. The second column though, takes the top of the outer div as reference (not sure if that tis called parent). I find this strange. I tried to make a second div inside but it didnt work. Can you only use div as a reference point or also a span element or p ?
  6. Dear All: In a W3school's tutorial is this tip: Tip: When aligning elements with position, always define margin and padding for the <body> element. This is to avoid visual differences in different browsers. Do we still need to do this if we have already declared the margin and padding for the whole page, e.g. *{margin: 0; padding:0;} and why?
  7. It is a three column theme. I want to make the space between the sidebar and the main content area narrower. And also widen both sidebars outwards. The site is: http://lifelessonshome.com/
  8. Hello, I wanted my website's display area to be exactly 768 px centered on the page. So here's the css properties I applied to the "main" div that contains every element I add on my webpage: div#main { margin-left: auto ; margin-right: auto ; width : 768px ;} It works, fine, however when I select several lines of text inside it, the blue selection is bleeding all the way to the left and right of the window (see attached image). How can I prevent this from happening? Thanks for reading! Thomas
  9. FateAce

    Help with header

    Hey guys, this is probably a newbie topic, but I can't seem to get the header to work for a website I'm making. I want to have it the where the div tag (or any other tag if it's better suited) be flush with the sides of the screen, much like it is on this site, and many others, such as the face punch forums. I have have tinkered, fiddled, and even copied directly from templates, in an attempt to make it do this. Butt every time, theres ALWAYS a 10px gap to the left side of the box. I have done and researched all I can, and I still cannot figure out why this is happening. What do I have to do t
  10. See http://jsfiddle.net/terryds/H3A4M/ The margin-top i want to add isn't working... I've tried the margin-bottom, and it gives me nothing too... Please help me...
  11. hey everyone, i have been sitting and trying to figure out my "footer" but without succes, what i want is my class "bund" to stay at bottom of the class "siden" i use siden to have all the other article in it, i dont want it to stay at bottom if theres no text on site, i just want it to float to bottom of the content. right now its like 10 px above the bottom, and i cant get it down so its margin 0. so thats why i asking in here. hope some can help fast. how its look with the code http://www.miltons.dk/nya/ Temi this my "php" <!DOCTYPE html><html lang="da"> <head
  12. Hey guys, I can't figure out why my top image on my table isn't working right. The bottom border won't show up and the image is clearly readjusting to something because the quality is awful when I put it into my coding, but it's fine on photobucket. I've adjusted the whole table size, the tr size, the td size, the padding and the margin on absolutely everything. I can't figure it out. Please help! Page i'm struggling with: audreyholmesmusic.webs.com/testhome.htm Let me know if 'view source' doesnt work and you need the code.
  13. Dear people I'm new here and I'm making my first steps in responsive design. I'm not english speaker and I will try to explain my problem in my better english. I'm testing a simple grid of 4 columns using 4 divs with width = 23 % (each div) and left and right margins = 1 %........ margin: 0% 1% 15px 1%; padding: 0% 0% 0% 0%; In other words..... 1% + 23% + 1% + 1% + 23% + 1% + 1% + 23% + 1% + 1% + 23% + 1% = 100 % ------------------- ------------------- -------------------- ------------------- All this works fine in Internet Explorer, Mozilla, Opera and Safari and eac
  14. Gerbrandd

    Aligning <div>

    Hello, I'm experiencing a little problem when trying to align different div sections. The page loads correctly in Safari/Chrome but when using other browsers, there is a little displacement (see image). I don't know what is causing the problem. Hope anyone of you can help me. Thanks in advance! <html><head>(...)<style>body{background-color:rgb(235,235,235);}.header{background-color:rgb(17,76,131);position:absolute;top:0px;left:0px;right:0px;height:120px;}.base{background-color:rgb(250,193,37);margin:auto;padding-bottom:15px;width:980px;padding-top:125px;height:auto;text-ali
  15. The div "rightLines" is extending past the display window in the browser, which is creating an unwanted horizontal scrollbar. Based on the CSS, I can understand why this is happening, but the confusing part is that the same thing doesn't happen for "hNavigation." Why is this? What I'd like to accomplish: To have the "hNavigation" div, and the "rightLines" div to fill the remaining space (of the window) on either side of the "mainContent" div, without having to specify a specific size for both. Perhaps this would be better accomplished with tables? Any help would be appreciated. Here is the cod
  16. I've been having some problems with getting what I wanted out of divs, and I am forced to come to the conclusion that CSS is broken. I've attached an HTML file to demonstrate the problems - you will need to edit its source HTML and follow the instructions to see the problems. I fully accept that *I* may be the problem rather than CSS, and at least all major browsers are suffering the same problem, but I really feel that CSS is at fault here and I was wondering what others thought? One challenge is to get a box to fit within the browser window (no scrolling required) with a 10 pixel border *a
  17. Hi guys, I am currently having some issues with certain elements of a website I am building displaying slightly differently in different browsers. One example is: I have a form which contains two text input fields and two buttons. I have the text input fields one beneath the other and the two buttons below them, side-by-side. They sit beside one another fine in Chrome and IE9 (believe it or not!) and barely in Opera. However, in Firefox they do not. I have given the buttons a class and played around with the margins and padding, I also floated each button to the left. I am also aware that eac
  18. Hi I am just self-learning CSS and am practising in a new WordPress site. It is only hosted locally for now so sorry I can't provide a link. I'm sure this is easy for a CSS guru though I am having trouble center aligning the text (i.e page links) within my horizontal navigation menus. I tried using padding (which works) though discovered it is displayed differently in different browsers (I am still learning about using universal CSS for multiple browsers). I read a few tutorials regarding using "margin: auto" and "align:center" though I have no idea where to use it in my code. I have tried a f
  19. I have a div animated by incremented margin-left when the user clicks a button. I would like to force the animation to stop at a specific margin-left value and callback a different animation. So if the user tries to click too far it prevents them from doing so. Suggestions? I'd like to do it with margin because it'd be easier to edit later, but if I have to use .position.left as a variable, I'll take the code for that just as well. Here's a wacky selector I tried, to no avail, if it helps convey my intention: $('.slidingDiv[style*=margin-left:80px]').stop().animate(.....); I didn't bind it to
  20. #footer {width: 500px;height: 50px;background-color: #FF9999;position: fixed;bottom: 0;}#menu {width: 500px;height: 50px;margin: 0;padding: 0;}img {width: 100px;height: 100px;}</style></head><body><div id="footer"> <div id="menu"> <img src="http://slayeroffice.com/code/imageCrossFade/img1.jpg" alt="Swimming Pool Water" /> <img src="http://slayeroffice.com/code/imageCrossFade/img2.jpg" alt="Notebook" /> <img src="http://slayeroffice.com/code/imageCrossFade/img3.jpg" alt="Bottle Neck" /> <img src="http://slayeroffice.com/code/imageCrossFa
  • Create New...