What files do you need for a website?

Status
Not open for further replies.
create more divs that act as wrappers, but in the html put them all inside a wrapper div

for example, have wrapper, top, left, middle divs.

<div class="wrapper">
<div class="top">link link link</div>
<div class="left">link link link</div>
<div class="middle>text blah blah blah</div>
</div>

then adjust the positioning of the top, left, and middle divs to be where you want them.
keep in mind that divs can overlap with each other if their size/positioning make it that way
 
ohh okay..this is where it's the invisible wrappers instead of a wrapper with a border...right? So it's like creating smaller wrappers inside the main one just so you can basically create like 3 columns or however many

i think I get it now...I'll toy around with that at some point today
 
^ right, but instead of giving the div a class give it an ID. The CSS class will still apply, but be specific to that div. So the code would look like:

HTML:
<div id="wrapper">
  <div id="top">link link link</div>
  <div id="left">link link link</div>
  <div id="middle>text blah blah blah</div>
</div>
Then the CSS would look like:
Code:
#wrapper {
style elements;
}
#top{
style elements;
}
#left {    
style elements;
}
Also, to have like nav links you will want to make an unordered ( <ul> ) list in the top div. Then apply a "display: inline" style to that as shown:
HTML:
<ul>
<li>Link 1</li>
<li>Link 2</li>
</ul>
Code:
#top li {
display: inline;
}
 
yep, what synergy said. Use id's when you're only planning on having one occurrence of it per page, classes for multiple - I often fail at using classes vs id's properly.
 
As far as I know, class and id are interchangeable, and will function + be w3 validated just fine, but it's a matter of "proper style". but don't quote me on that lol.
 
Would you have to do that on every page or could you just do it in one place some how and have every page look the same, just different text in the middle pretty much (depending on the page)....

like

link link link home contact link link blah
link1 DIFFERENT TEXT HERE
link2 DEPENDING ON THE PAGE
link3 BUT LINKS ARE ALWAYS THERE
link4
link5
link6

I mean i could do it that way now with having the same thing over n over for every page in their html file..but just curious if I can just declare it at one spot and it's like that automatically for every page
 
You need the html on every page. You can link to the same external style sheet (that's the point of it), but you still need to copy the same html structuring from your index page. Once again, look at my site for an example

index: Stern Studios
page 2: Stern Studios - About
etc

the source code html is almost identical across them, but it's so little that it's not a big deal to copy/paste it. If I was using inline css, rather than linking to an external style sheet, the copy and pasting would be much longer.

I think that's what you were asking?
 
okay that makes sense then

still having issues with the text showing in the middle...i can get links to go across the top and down the side..but when I include the "middle" thing it just puts it below the last link on the left side instead of the text being on the same line as the links
 
Status
Not open for further replies.
Back
Top Bottom