When writing lots of paragraphs what is the best way to do it:
A:
<p>Paragraph 1</p>
<p>Paragraph 2</p>
<p>Paragraph 3</p>
or B:
<p>Paragraph 1...<br />
Paragraph 2...<br />
Paragraph 3...</p>
-----------------------------------------
When creating complex-ish layouts, like the image i've attached below, what is the best way to do this in CSS. I have a feeling i'm going the long winded way about it.
Ignoring the header and footer, this is my CSS for the below image:
main width 800px
#menu {
width: 250px;
float: left;
}
#BigPhoto {
width: 550px
float: left;
}
#Middle {
width: 400px
float: left;
}
Text {
width: 650px;
float: left;
}
PhotoBottom {
width: 150px;
float: left;
}
.clear { clear: both; } /*to bring the footer down*/
Also, if each of the columns on each row varied in size i would also have to wrap those in <div></div> to keep in rows inline.
I've worked on a website that is laid out similar to this, and it has different layouts on every page.. This has made the CSS look very messy, i'm just wondering if that's the way you would go about doing those types of layouts.
Is there a way to get text and photo side by side without putting each in it's own div?
Question
game_over
When writing lots of paragraphs what is the best way to do it:
A:
<p>Paragraph 1</p>
<p>Paragraph 2</p>
<p>Paragraph 3</p>
or B:
<p>Paragraph 1...<br />
Paragraph 2...<br />
Paragraph 3...</p>
-----------------------------------------
When creating complex-ish layouts, like the image i've attached below, what is the best way to do this in CSS. I have a feeling i'm going the long winded way about it.
Ignoring the header and footer, this is my CSS for the below image:
main width 800px
#menu {
width: 250px;
float: left;
}
#BigPhoto {
width: 550px
float: left;
}
#Middle {
width: 400px
float: left;
}
Text {
width: 650px;
float: left;
}
PhotoBottom {
width: 150px;
float: left;
}
.clear { clear: both; } /*to bring the footer down*/
Also, if each of the columns on each row varied in size i would also have to wrap those in <div></div> to keep in rows inline.
I've worked on a website that is laid out similar to this, and it has different layouts on every page.. This has made the CSS look very messy, i'm just wondering if that's the way you would go about doing those types of layouts.
Is there a way to get text and photo side by side without putting each in it's own div?
Link to comment
https://www.neowin.net/forum/topic/886726-basic-htmlcss-questions/Share on other sites
11 answers to this question
Recommended Posts