Hello everyone. New member here and also new to website building. I’ve just begun following an online tutorial on html/css/php/etc, and been playing around with some coding. I have a question regarding the <div> tag. I’ve used 2 examples given by the tutorial and 1 doesn’t seem to work.
<div id=“content” align=“left” bgcolor=“white”>
<h5>Content Articles</h5>
<p>This paragraph would be your content
paragraph with all of your readable material.</p>
</div>
My question is regarding the background color. It’s green when using the 1st example. But, there is no color when using the 2nd. What exactly is the difference/problem here?
Hello, I’m back with another question.
Ok, basically I’m trying to replace tables with the div. I don’t want to use tables unless I have actual tabular data. I have a div block/“table” at the top of the page where my navigation links are. I’m trying to get another div container below it to hold the main content. But, I can’t get them on top of each other. The 2nd div is being placed inline after the 1st div. So far, I managed to get it to look how I want by using 2 </br> tags between the two containers. Is there a better/correct way? Or is the </br> the only way?
there definitely is a better way, but it’d be good to see a link to the site you’re working on so that we know what code you’re using and how the elements interact with one another.
Thanks for the response.
Here’s a link to my testing page. I can get 2 div blocks to stack on top of each other. But something about the actual block I’m trying to work with just won’t stack properly. You should be able to tell what I’m trying to do by looking at the sample page.
Ok, I added another portion to this and hit two more problems.
First, my nav links are located at the very top of the container. I tried to use padding to lower the text, but my login box gets lowered with it. Is there a way to lower just the nav links independently of the login box?? I want the text to come down and match the “Partners” text.
Second, at the far right, there’s a big space after “Sign Up” when viewing with FireFox. It looks the way I want when viewing in Chrome however. But, if I fix it to look good in FF, it throws everything out of whack in Chrome.
I’ll try to paste the code below. Hopefully it’s something easy that I’m just missing.
Thank you very much for that, kohoutek. I actually tried to use the <ul> to make my menu bar at first, but it kept coming out as an actual list…lol. I didn’t even think or know to add that data into the css file to control it. I will toy around with your code and see if I can tweak it a little. But first, I need to look at it and try to understand how it all works together…lol. Thanks again K.