If you like SEOmastering Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...

 

Aligning navagation and body text

Started by Walalayo, 08-05-2011, 03:20:38

Previous topic - Next topic

WalalayoTopic starter

hello ....I just started using CSS and have a dummy question. my webpage is lined up so that i have a verical navagation bar to the left of the page and one on the bottom placed horizontal. I can't seem to figure out how to align my paragraphs of text and still have my vertical navigation staying to the left of the page and my paragraphs of text aligned with it...any help would be grateful.
thanks.


john2020

Hi! I'd be happy to help you with your CSS question. To align your paragraphs of text with the vertical navigation bar, you can use CSS's float property.

First, make sure your vertical navigation bar is styled as a block element. You can achieve this by setting its display property to "block" or "inline-block".

Then, for your paragraphs of text, you can set their float property to "left" to make them align with the vertical navigation bar. This will allow the paragraphs to flow around the navigation bar.

Here's an example of how the CSS code might look like:

```css
.vertical-nav {
  display: inline-block;
  width: 200px; /* adjust the width as needed */
}

p {
  float: left;
  margin-left: 20px; /* add some spacing between the navigation bar and paragraphs */
}
```

With these CSS rules, the paragraphs will align with the vertical navigation bar while flowing around it. Remember to adjust the widths and margins according to your specific layout.
  •  


If you like SEOmastering Forum, you can support it by - BTC: bc1qppjcl3c2cyjazy6lepmrv3fh6ke9mxs7zpfky0 , TRC20 and more...